diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2020-11-30 19:31:21 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2020-11-30 21:46:45 +0300 |
commit | 814b2787caddf5bd81477bd7b5dea8c45c402a72 (patch) | |
tree | b936548e5f84016c6cff1feab96dfbeb7c42dce0 /source/blender/blenlib/CMakeLists.txt | |
parent | 6022103264cf2e23ad884fce6b5dfadf88b24e05 (diff) |
Fix T83196: bad matrix to quaternion precision near 180 degrees rotation.
Adjust the threshold for switching from the base case to trace > 0,
based on very similar example code from www.euclideanspace.com to
avoid float precision issues when trace is close to -1.
Also, remove conversions to and from double, because using double
here doesn't really have benefit, especially with the new threshold.
Finally, add quaternion-matrix-quaternion round trip tests with
full coverage for all 4 branches.
Differential Revision: https://developer.blender.org/D9675
Diffstat (limited to 'source/blender/blenlib/CMakeLists.txt')
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index bcc8c181af4..9736d8f9b3b 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -400,6 +400,7 @@ if(WITH_GTESTS) tests/BLI_math_color_test.cc tests/BLI_math_geom_test.cc tests/BLI_math_matrix_test.cc + tests/BLI_math_rotation_test.cc tests/BLI_math_solvers_test.cc tests/BLI_math_vector_test.cc tests/BLI_memiter_test.cc |