Mantis 5346: llAxisAngle2Rot() should normalize before computing

Corrected to agree with
http://wiki.secondlife.com/wiki/Llaxisangle2rot#Deep_Notes
to normalise the vector before computing the quaternion

Signed-off-by: dahlia <dahlia@nomail>
cpu-performance
Talun 2013-06-10 09:32:14 +01:00 committed by dahlia
parent e741e5ebce
commit 7de0912a97
1 changed files with 1 additions and 0 deletions

View File

@ -4651,6 +4651,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
s = Math.Cos(angle * 0.5);
t = Math.Sin(angle * 0.5); // temp value to avoid 2 more sin() calcs
axis = LSL_Vector.Norm(axis);
x = axis.x * t;
y = axis.y * t;
z = axis.z * t;