LSL_Rotation.Normalize() now returns 0,0,0,1 for x,y,z,s when normalization fails

cpu-performance
dahlia 2013-06-10 17:54:14 -07:00
parent 9d9b9d4938
commit ba84074468
1 changed files with 2 additions and 2 deletions

View File

@ -377,10 +377,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
double length = Math.Sqrt(x * x + y * y + z * z + s * s); double length = Math.Sqrt(x * x + y * y + z * z + s * s);
if (length < float.Epsilon) if (length < float.Epsilon)
{ {
x = 1; x = 0;
y = 0; y = 0;
z = 0; z = 0;
s = 0; s = 1;
} }
else else
{ {