Catch quaternion canonical corner cases (#116)

This commit is contained in:
kritz
2019-12-18 14:12:47 +01:00
committed by Julian Kent
parent 4f3565da94
commit e81483a808
4 changed files with 62 additions and 14 deletions
+6
View File
@@ -78,4 +78,10 @@ Type wrap_2pi(Type x)
return wrap(x, Type(0), Type(M_TWOPI));
}
template<typename T>
int sign(T val)
{
return (T(FLT_EPSILON) < val) - (val < T(FLT_EPSILON));
}
} // namespace matrix