From a2c0a453d35827cb40e62eaa9ff49b78b3f98598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Fri, 15 Mar 2019 10:50:47 -0400 Subject: [PATCH] Add operator explanation to docs Co-Authored-By: tpdickso --- src/geometry/isometry.rs | 4 ++++ src/geometry/quaternion.rs | 4 ++++ src/geometry/rotation.rs | 4 ++++ src/geometry/similarity.rs | 4 ++++ src/geometry/transform.rs | 4 ++++ src/geometry/translation.rs | 2 ++ src/geometry/unit_complex.rs | 4 ++++ 7 files changed, 26 insertions(+) diff --git a/src/geometry/isometry.rs b/src/geometry/isometry.rs index 04e77b7a..9519a347 100755 --- a/src/geometry/isometry.rs +++ b/src/geometry/isometry.rs @@ -257,6 +257,8 @@ where DefaultAllocator: Allocator /// Transform the given point by this isometry. /// + /// This is the same as the multiplication `self * pt`. + /// /// # Example /// /// ``` @@ -278,6 +280,8 @@ where DefaultAllocator: Allocator /// Transform the given vector by this isometry, ignoring the translation /// component of the isometry. /// + /// This is the same as the multiplication `self * v`. + /// /// # Example /// /// ``` diff --git a/src/geometry/quaternion.rs b/src/geometry/quaternion.rs index 365e55e2..c8617f1d 100755 --- a/src/geometry/quaternion.rs +++ b/src/geometry/quaternion.rs @@ -1008,6 +1008,8 @@ impl UnitQuaternion { /// Rotate a point by this unit quaternion. /// + /// This is the same as the multiplication `self * pt`. + /// /// # Example /// /// ``` @@ -1026,6 +1028,8 @@ impl UnitQuaternion { /// Rotate a vector by this unit quaternion. /// + /// This is the same as the multiplication `self * v`. + /// /// # Example /// /// ``` diff --git a/src/geometry/rotation.rs b/src/geometry/rotation.rs index 961951f1..10348eb4 100755 --- a/src/geometry/rotation.rs +++ b/src/geometry/rotation.rs @@ -358,6 +358,8 @@ where DefaultAllocator: Allocator + Allocator { /// Rotate the given point. /// + /// This is the same as the multiplication `self * pt`. + /// /// # Example /// ``` /// # #[macro_use] extern crate approx; @@ -375,6 +377,8 @@ where DefaultAllocator: Allocator + Allocator /// Rotate the given vector. /// + /// This is the same as the multiplication `self * v`. + /// /// # Example /// ``` /// # #[macro_use] extern crate approx; diff --git a/src/geometry/similarity.rs b/src/geometry/similarity.rs index dcb0f20a..b890dc67 100755 --- a/src/geometry/similarity.rs +++ b/src/geometry/similarity.rs @@ -241,6 +241,8 @@ where /// Transform the given point by this similarity. /// + /// This is the same as the multiplication `self * pt`. + /// /// # Example /// ``` /// # #[macro_use] extern crate approx; @@ -260,6 +262,8 @@ where /// Transform the given vector by this similarity, ignoring the translational /// component. /// + /// This is the same as the multiplication `self * t`. + /// /// # Example /// ``` /// # #[macro_use] extern crate approx; diff --git a/src/geometry/transform.rs b/src/geometry/transform.rs index 56a65992..e0eb1bb9 100755 --- a/src/geometry/transform.rs +++ b/src/geometry/transform.rs @@ -464,6 +464,8 @@ where + Allocator, { /// Transform the given point by this transformation. + /// + /// This is the same as the multiplication `self * pt`. #[inline] pub fn transform_point(&self, pt: &Point) -> Point { self * pt @@ -471,6 +473,8 @@ where /// Transform the given vector by this transformation, ignoring the /// translational component of the transformation. + /// + /// This is the same as the multiplication `self * v`. #[inline] pub fn transform_vector(&self, v: &VectorN) -> VectorN { self * v diff --git a/src/geometry/translation.rs b/src/geometry/translation.rs index 89960961..a49b2706 100755 --- a/src/geometry/translation.rs +++ b/src/geometry/translation.rs @@ -197,6 +197,8 @@ where DefaultAllocator: Allocator { /// Translate the given point. /// + /// This is the same as the multiplication `self * pt`. + /// /// # Example /// ``` /// # use nalgebra::{Translation3, Point3}; diff --git a/src/geometry/unit_complex.rs b/src/geometry/unit_complex.rs index bd064ef3..6e8cf81d 100755 --- a/src/geometry/unit_complex.rs +++ b/src/geometry/unit_complex.rs @@ -254,6 +254,8 @@ impl UnitComplex { /// Rotate the given point by this unit complex number. /// + /// This is the same as the multiplication `self * pt`. + /// /// # Example /// ``` /// # #[macro_use] extern crate approx; @@ -270,6 +272,8 @@ impl UnitComplex { /// Rotate the given vector by this unit complex number. /// + /// This is the same as the multiplication `self * v`. + /// /// # Example /// ``` /// # #[macro_use] extern crate approx;