Closed GoogleCodeExporter closed 8 years ago
The Perp operator you are speaking of is technically the cross product in 2D.
Because the binary form of the cross product (that gives a vector result) is
only defined in 3 and 7 dimensions, a normal cross product for Vector2 does not
exist. However, an 'artifical' cross product can be made for n dimensions by
taking n-1 vector arguments and giving out a Vectorn result. This means that
the Perp operator is technically the cross product in 2D. This is the reason we
don't have a Cross product method in the Vector2 and Vector4 classes.
That aside I will implement the Perp operator and most likely the PerpDot
operation for Vector2.
As for the double precision version of the library, it is not planned because
C# does not support #define symbols that take on a value and C# does not
support macros. This makes it hard to create an elegant solution for both
single and double precision. Any suggestions will be welcome on this issue.
Original comment by Jorgy...@gmail.com
on 14 Feb 2011 at 8:04
I added Perp and PerpDot methods to the Vector2 structure in r41.
Original comment by Jorgy...@gmail.com
on 15 Feb 2011 at 1:13
Original issue reported on code.google.com by
avengerd...@gmail.com
on 4 Nov 2010 at 9:13