|
From: Patrick H. <pa...@vr...> - 2002-04-09 23:31:32
|
There is something wrong with gmtl::Math::aTan2<float>(float,float).
Regardless of the values for fY and fX, it always returns NAN garbage,
and fY and fX get munged *after* atan2f(3) is called. I think it
probably returns NAN regardless of the values of fY and fX, but I have
not verified this. I have verified that the resulting values are always
0 no matter what the input matrix contains.
I have tried changing the parameters to be const, but it doesn't make any
difference. I do not know how atan2f(3) could be modifying its parameters.
The code that exhibits this problem is as follows:
gmtl::Vec3f xyzAngles;
gmtl::Matrix44f* wand_matrix;
wand_matrix = mWand->getData();
gmtl::getRot(*wand_matrix, xyzAngles[0], xyzAngles[1], xyzAngles[2],
gmtl::XYZ);
I sincerely hope something is wrong with the above and not with the Linux
math library.
-Patrick
--
Patrick L. Hartling | Research Assistant, VRAC
pa...@vr... | 2624 Howe Hall -- (515)294-4916
http://www.137.org/patrick/ | http://www.vrac.iastate.edu/
|