Low dimensional matrices, vectors, quaternions and a cubic equation
Lars T. Kyllingstad
public at kyllingen.NOSPAMnet
Mon Apr 19 04:49:38 PDT 2010
#ponce wrote:
> I don't know if this help, but here is a subset of my "math" package I've used in real-time applications.
>
> http://ponce.paradisia.net/temp/math_package.zip
>
> Such code is absolutely not what one would expect to find in a standard library (lots of assembly, almost no std.math, no safety-checks, no clever templates) but it works for me. You may find some useful parts in it.
>
> Maybe merging the good ideas of OMG, Yage, your code, etc... (and sorting out licences "problems")... would lead to a better low-dimensionnal math package class.
>
> Thingsq important to me:
> - expressivity
I like this (from your math.vec3 module):
struct vec3(T)
{
union
{
struct { T x, y, z; }
T[3] v;
}
...
}
That's a pretty neat trick. :) I didn't even know anonymous unions were
possible.
-Lars
More information about the Digitalmars-d
mailing list