From c1f808d9288f69878d8bc557654d6bcb53593e8a Mon Sep 17 00:00:00 2001 From: Michael Tang Date: Fri, 22 Mar 2019 22:01:47 -0700 Subject: [PATCH] Add documentation for `>>::rotate_vector`. Fixes #479. --- src/quaternion.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/quaternion.rs b/src/quaternion.rs index ff4ba4d..1d9b4c3 100644 --- a/src/quaternion.rs +++ b/src/quaternion.rs @@ -729,6 +729,9 @@ impl Rotation> for Quaternion { Quaternion::from_sv(k + k_cos_theta, a.cross(b)).normalize() } + /// Evaluate the conjugation of `vec` by `self`. + /// + /// Note that `self` should be a unit quaternion (i.e. normalized) to represent a 3D rotation. #[inline] fn rotate_vector(&self, vec: Vector3) -> Vector3 { self * vec