diff --git a/src/geometry/quaternion.rs b/src/geometry/quaternion.rs index 375c6b57..eafb0de6 100644 --- a/src/geometry/quaternion.rs +++ b/src/geometry/quaternion.rs @@ -202,6 +202,12 @@ impl Quaternion { self.coords.norm_squared() } + /// The dot product of two quaternions. + #[inline] + pub fn dot(&self, rhs: &Self) -> N { + self.coords.dot(&rhs.coords) + } + /// The polar decomposition of this quaternion. /// /// Returns, from left to right: the quaternion norm, the half rotation angle, the rotation