Giter Site home page Giter Site logo

VectorOperations should use 'ref' about kdmap HOT 3 CLOSED

cheind avatar cheind commented on June 26, 2024
VectorOperations should use 'ref'

from kdmap.

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
siwtched milestone number

Original comment by [email protected] on 21 Jun 2009 at 1:05

  • Added labels: Milestone-Release9.8
  • Removed labels: Milestone-Release1.0

from kdmap.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
Adding an issue-test to verify issue.
Currently, if a struct is used that encapsulates the coordinates as a reference 
type 
(i.e as an System.Array or Collection type) then everything works as expected. 
The 
struct is copied by value, but coordinates are copied by reference. 

On the other side, when value types are explicitely used to store the 
coordinates 
VectorOperations methods fail.

Original comment by [email protected] on 22 Jun 2009 at 6:05

  • Changed state: Started

from kdmap.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 26, 2024
modified signatures of methods modifying IVectors to 

Sub<T>(IVector a, IVector b, ref T dest) where T : IVector {}.

It seems to be inconvinient/impossible to have a signature such as 

Sub(IVector a, IVector b, ref IVector dest)

since the ref argument need to be cast to IVector such as

Sub(a, b, ref (IVector)dest) which is not possible.

resolved in revision #148.

Original comment by [email protected] on 22 Jun 2009 at 7:01

  • Changed state: Fixed

from kdmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.