aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/LLSDInventoryFolder.cs
diff options
context:
space:
mode:
authorJohn Cochran2012-01-03 11:38:38 -0600
committerMelanie2012-01-06 21:30:51 +0000
commite9b9eb6a4c6eaf161532994414f524e823d15120 (patch)
tree28b27e978e2c9ddf45c6aa583050fe468c7f960e /OpenSim/Capabilities/LLSDInventoryFolder.cs
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-e9b9eb6a4c6eaf161532994414f524e823d15120.zip
opensim-SC_OLD-e9b9eb6a4c6eaf161532994414f524e823d15120.tar.gz
opensim-SC_OLD-e9b9eb6a4c6eaf161532994414f524e823d15120.tar.bz2
opensim-SC_OLD-e9b9eb6a4c6eaf161532994414f524e823d15120.tar.xz
Replaced llRot2Euler function.
The original function suffered from unexpected results due to rounding errors. An error of only 1 or 2 ulps would cause the code to not detect a singularity at Y rotation +/- PI/2 and take the non-singularity code path. The replacement code does not suffer from wildly inaccurate results at the +/- PI/2 singularity. The check in the code for the singularity isn't strictly needed, but gives more consistent results At the singularity, the X and Z rotations add. The if check simply forces the X rotation to be zero so the entirety of the X+Z rotation is carried by Z. Additionally, the test code has been updated to include test cases that caused the old code to fail. The test algorithm is also updated to perform a more meaningful test. The original code checked if the values against expected values. This could fail at +/- PI rotations since a rotation around an axis by PI causes the identical effect as a rotation by -PI. The new test code checks that the returned angles can be used to recreate a quaternion that causes the same rotation.
Diffstat (limited to 'OpenSim/Capabilities/LLSDInventoryFolder.cs')
0 files changed, 0 insertions, 0 deletions