Commit 6c62592d authored by hybrid's avatar hybrid

Fix precision problems in new method.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2877 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 35fe8766
......@@ -302,7 +302,7 @@ namespace core
vector3d<T> getSphericalCoordinateAngles()
{
vector3d<T> angle;
const T length=getLength();
const f64 length = X*X + Y*Y + Z*Z;
if (length)
{
......@@ -313,7 +313,7 @@ namespace core
else if (Z<0)
angle.Y=180;
angle.X = (T)(acos(Y / length) * RADTODEG);
angle.X = (T)(acos(Y * core::reciprocal_squareroot(length)) * RADTODEG64);
}
return angle;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment