use crate::scalar::Numeric;
mod free_joint;
mod inertia;
mod lie;
mod quaternion;
mod twist;
mod wrench;
pub use free_joint::FreeJointState;
pub use inertia::SpatialInertia;
pub use lie::{SE2, SE3, SO2, SO3};
pub use quaternion::Quaternion;
pub use twist::Twist;
pub use wrench::Wrench;
#[inline]
#[must_use]
pub(crate) fn small_angle<T: Numeric>() -> T {
T::EPSILON_X30
}
#[inline]
#[must_use]
pub(crate) fn small_angle_sq<T: Numeric>() -> T {
small_angle::<T>() * small_angle::<T>()
}
#[inline]
#[must_use]
pub(crate) fn small_angle_so3_sq<T: Numeric>() -> (T, T) {
let t1 = (T::from_f64(360.0) * T::EPSILON).cbrt();
let t2 = (T::from_f64(2520.0) * T::EPSILON).cbrt();
(t1, t2)
}
#[inline]
#[must_use]
pub(crate) fn small_angle_inverse_so3_sq<T: Numeric>() -> T {
(T::from_f64(15_120.0) * T::EPSILON).cbrt()
}
#[inline]
#[must_use]
pub(crate) fn small_angle_se3_sq<T: Numeric>() -> (T, T, T) {
let t2 = (T::from_f64(2520.0) * T::EPSILON).cbrt();
let t3 = (T::from_f64(20_160.0) * T::EPSILON).sqrt().sqrt();
let t5 = (T::from_f64(181_440.0) * T::EPSILON).sqrt().sqrt();
(t2, t3, t5)
}