Add documentation for <Quaternion as Rotation<Point3<S>>>::rotate_vector. Fixes #479.

This commit is contained in:
Michael Tang 2019-03-22 22:01:47 -07:00
parent 9402a01a5b
commit c1f808d928

View file

@ -729,6 +729,9 @@ impl<S: BaseFloat> Rotation<Point3<S>> for Quaternion<S> {
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<S>) -> Vector3<S> {
self * vec