• Roman Shapovalov's avatar
    Sign issue about quaternion_to_matrix and matrix_to_quaternion · 1b39cebe
    Roman Shapovalov authored
    Summary:
    As reported on github, `matrix_to_quaternion` was incorrect for rotations by 180˚. We resolved the sign of the component `i` based on the sign of `i*r`, assuming `r > 0`, which is untrue if `r == 0`.
    
    This diff handles special cases and ensures we use the non-zero elements to copy the sign from.
    
    Reviewed By: bottler
    
    Differential Revision: D29149465
    
    fbshipit-source-id: cd508cc31567fc37ea3463dd7e8c8e8d5d64a235
    1b39cebe
test_rotation_conversions.py 10.4 KB