aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs34
1 files changed, 20 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
index 7594691..99c1cf4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
@@ -201,20 +201,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
201 CheckllRot2Euler(new LSL_Types.Quaternion(-0.092302, -0.701059, -0.092302, -0.701059)); 201 CheckllRot2Euler(new LSL_Types.Quaternion(-0.092302, -0.701059, -0.092302, -0.701059));
202 } 202 }
203 203
204 // Testing Rot2Euler this way instead of comparing against expected angles because 204 /// <summary>
205 // 1. There are several ways to get to the original Quaternion. For example a rotation 205 /// Check an llRot2Euler conversion.
206 // of PI and -PI will give the same result. But PI and -PI aren't equal. 206 /// </summary>
207 // 2. This method checks to see if the calculated angles from a quaternion can be used 207 /// <remarks>
208 // to create a new quaternion to produce the same rotation. 208 /// Testing Rot2Euler this way instead of comparing against expected angles because
209 // However, can't compare the newly calculated quaternion against the original because 209 /// 1. There are several ways to get to the original Quaternion. For example a rotation
210 // once again, there are multiple quaternions that give the same result. For instance 210 /// of PI and -PI will give the same result. But PI and -PI aren't equal.
211 // <X, Y, Z, S> == <-X, -Y, -Z, -S>. Additionally, the magnitude of S can be changed 211 /// 2. This method checks to see if the calculated angles from a quaternion can be used
212 // and will still result in the same rotation if the values for X, Y, Z are also changed 212 /// to create a new quaternion to produce the same rotation.
213 // to compensate. 213 /// However, can't compare the newly calculated quaternion against the original because
214 // However, if two quaternions represent the same rotation, then multiplying the first 214 /// once again, there are multiple quaternions that give the same result. For instance
215 // quaternion by the conjugate of the second, will give a third quaternion representing 215 /// <X, Y, Z, S> == <-X, -Y, -Z, -S>. Additionally, the magnitude of S can be changed
216 // a zero rotation. This can be tested for by looking at the X, Y, Z values which should 216 /// and will still result in the same rotation if the values for X, Y, Z are also changed
217 // be zero. 217 /// to compensate.
218 /// However, if two quaternions represent the same rotation, then multiplying the first
219 /// quaternion by the conjugate of the second, will give a third quaternion representing
220 /// a zero rotation. This can be tested for by looking at the X, Y, Z values which should
221 /// be zero.
222 /// </remarks>
223 /// <param name="rot"></param>
218 private void CheckllRot2Euler(LSL_Types.Quaternion rot) 224 private void CheckllRot2Euler(LSL_Types.Quaternion rot)
219 { 225 {
220 // Call LSL function to convert quaternion rotaion to euler radians. 226 // Call LSL function to convert quaternion rotaion to euler radians.