mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user