Cleanup: Fix mistaken dependency between rotation headers

The quaternion header depended on the old C header where it doesn't
need to with a better alternative in the newer C++ types. Also remove an
unused function in another header.
This commit is contained in:
Hans Goudey
2023-06-08 17:33:47 -04:00
parent 65d294c385
commit 04422064fb
2 changed files with 1 additions and 7 deletions

View File

@@ -74,12 +74,6 @@ template<typename T> struct AngleRadianBase {
/** Methods. */
/* 'mod_inline(-3, 4)= 1', 'fmod(-3, 4)= -3' */
static float mod_inline(float a, float b)
{
return a - (b * floorf(a / b));
}
/**
* Return the angle wrapped inside [-pi..pi] interval. Basically `(angle + pi) % 2pi - pi`.
*/

View File

@@ -680,7 +680,7 @@ template<typename T> QuaternionBase<T> QuaternionBase<T>::expmap(const VecBase<T
T angle;
const VecBase<T, 3> axis = normalize_and_get_length(expmap, angle);
if (LIKELY(angle != T(0))) {
return to_quaternion(AxisAngleT(axis, angle_wrap_rad(angle)));
return to_quaternion(AxisAngleT(axis, AngleRadianBase<T>(angle).wrapped()));
}
return QuaternionBase<T>::identity();
}