How in god's name is someone supposed to know that they need to include Generate.h to get the FAQ code for cross products to work? And why would this not be in VecOps.h?
gmtl::Vec3f vecA, vecB, crossVec;
crossVec = gmtl::cross( vecA, vecB );
I was beating my head up against the wall for hours first thinking that cross( vec3f, vec3f ) had been removed completely.
Please put some documentation as to where
It looks like maybe the documentation is out of sync with the code
Some versions have it in VecOps.h some in Generate.h some it doesn't exist, and there is only makeCross
WTF.
...and the compiler with optimization turned on produces the same code in either case since in eliminates unnecessary temp vars. I checked:
gmtl::Vec3d vec1(1.0, 1.5, -1.0), vec2(1.5, 1.0, -1.0), vec3;
gmtl::cross(vec1, vec2, vec3);
vs
gmtl::Vec3d vec1(1.0, 1.5, -1.0), vec2(1.5, 1.0, -1.0), vec3;
vec3 = gmtl::makeCross(vec1, vec2);
With -O3 in gcc is the same.