Check For NaN and Infinity in llRot2Axis/Angle Fixes mantis #6669
parent
a949556c4e
commit
1c7fbb86c2
|
@ -4692,7 +4692,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
y = rot.y / s;
|
||||
z = rot.z / s;
|
||||
}
|
||||
|
||||
if ((double.IsNaN(x)) || double.IsInfinity(x)) x = 0;
|
||||
if ((double.IsNaN(y)) || double.IsInfinity(y)) y = 0;
|
||||
if ((double.IsNaN(z)) || double.IsInfinity(z)) z = 0;
|
||||
return new LSL_Vector(x,y,z);
|
||||
}
|
||||
|
||||
|
@ -4714,7 +4716,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
|
||||
double angle = 2 * Math.Acos(rot.s);
|
||||
|
||||
if ((double.IsNaN(angle)) || double.IsInfinity(angle)) angle = 0;
|
||||
return angle;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue