When we set radians large value, it often causes numerical error.
This is because calling _wrap_angle is late.
So I try to reduce numerical error by calling _wrap_angle earlier.
e.x.
Quaternion(axis=[0.0,0.0,1.0], radians=4.0*np.pi).radians
The current version output is 4.440892098500626e-16
On the other hand, this PR outputs 0.0
When we set
radians
large value, it often causes numerical error. This is because calling_wrap_angle
is late. So I try to reduce numerical error by calling_wrap_angle
earlier.e.x.
Quaternion(axis=[0.0,0.0,1.0], radians=4.0*np.pi).radians
The current version output is4.440892098500626e-16
On the other hand, this PR outputs0.0