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
parent
e741e5ebce
commit
7de0912a97
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue