Closed SilentPenguin closed 7 years ago
I have implemented this as per the above description.
As a side note: Support libraries (such as collision detection) written for sparrow should use the sized versions of these vectors unless variable sizes are permitted. This means any casting error will occur within the programmer's own code. This makes sparrow much easier to consume.
With the
Sparrow.Numerics
implementation, the resulting size of a mathematical operation is defined by the largest dimension of the operands.This sort of behaviour becomes problematic when working with libraries such as OpenGL that expect a fixed size vector. The engine would be quietly creating and discarding data in the background without the coder knowing.
Under a possible new system
Sparrow.Numerics
would:Sized objects would:
Vector.Two
,.Three
and.Four
andMatrix.Two
,.Three
, and.Four
.Unsized objects would:
Vector
, andMatrix
.