diff --git a/src/euler.rs b/src/euler.rs index 60bcbd7..4211d05 100644 --- a/src/euler.rs +++ b/src/euler.rs @@ -43,7 +43,7 @@ use num::BaseFloat; /// Note that while [Euler angles] are intuitive to define, they are prone to /// [gimbal lock] and are challenging to interpolate between. Instead we /// recommend that you convert them to a more robust representation, such as a -/// quaternion or or rotation matrix. To this end, `From>` conversions +/// quaternion or a rotation matrix. To this end, `From>` conversions /// are provided for the following types: /// /// - [`Basis3`](struct.Basis3.html) diff --git a/src/quaternion.rs b/src/quaternion.rs index 384bf1e..b5db09c 100644 --- a/src/quaternion.rs +++ b/src/quaternion.rs @@ -74,13 +74,13 @@ impl Into for Quaternion { impl Quaternion { /// Construct a new quaternion from one scalar component and three - /// imaginary components + /// imaginary components. #[inline] pub fn new(w: S, xi: S, yj: S, zk: S) -> Quaternion { Quaternion::from_sv(w, Vector3::new(xi, yj, zk)) } - /// Construct a new quaternion from a scalar and a vector + /// Construct a new quaternion from a scalar and a vector. #[inline] pub fn from_sv(s: S, v: Vector3) -> Quaternion { Quaternion { s: s, v: v } @@ -559,7 +559,7 @@ impl ApproxEq for Quaternion { } impl From> for Matrix3 { - /// Convert the quaternion to a 3 x 3 rotation matrix + /// Convert the quaternion to a 3 x 3 rotation matrix. fn from(quat: Quaternion) -> Matrix3 { let x2 = quat.v.x + quat.v.x; let y2 = quat.v.y + quat.v.y; @@ -584,7 +584,7 @@ impl From> for Matrix3 { } impl From> for Matrix4 { - /// Convert the quaternion to a 4 x 4 rotation matrix + /// Convert the quaternion to a 4 x 4 rotation matrix. fn from(quat: Quaternion) -> Matrix4 { let x2 = quat.v.x + quat.v.x; let y2 = quat.v.y + quat.v.y; diff --git a/src/rotation.rs b/src/rotation.rs index 7c0d277..566c23d 100644 --- a/src/rotation.rs +++ b/src/rotation.rs @@ -34,7 +34,7 @@ pub trait Rotation: Sized + Copy + One where Self: ApproxEq::Scalar>,

::Scalar: BaseFloat, { - /// Create a rotation to a given direction with an 'up' vector + /// Create a rotation to a given direction with an 'up' vector. fn look_at(dir: P::Diff, up: P::Diff) -> Self; /// Create a shortest rotation to transform vector 'a' into 'b'. @@ -232,7 +232,7 @@ impl fmt::Debug for Basis2 { /// The matrix is guaranteed to be orthogonal, so some operations, specifically /// inversion, can be implemented more efficiently than the implementations for /// `math::Matrix3`. To ensure orthogonality is maintained, the operations have -/// been restricted to a subeset of those implemented on `Matrix3`. +/// been restricted to a subset of those implemented on `Matrix3`. #[derive(PartialEq, Copy, Clone)] #[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))] #[cfg_attr(feature = "eders", derive(Serialize, Deserialize))] diff --git a/src/vector.rs b/src/vector.rs index a289614..ded4e77 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -110,7 +110,7 @@ macro_rules! impl_vector { } impl $VectorN { - /// Component-wise casting to another type + /// Component-wise casting to another type. #[inline] pub fn cast(&self) -> $VectorN { $VectorN { $($field: NumCast::from(self.$field).unwrap()),+ } @@ -318,7 +318,7 @@ macro_rules! impl_vector_default { } impl $VectorN { - /// Component-wise casting to another type + /// Component-wise casting to another type. #[inline] pub fn cast(&self) -> $VectorN { $VectorN { $($field: NumCast::from(self.$field).unwrap()),+ } @@ -665,7 +665,7 @@ impl Vector4 { Vector3::new(self.x, self.y, self.z) } - /// Create a `Vector3`, dropping the nth element + /// Create a `Vector3`, dropping the nth element. #[inline] pub fn truncate_n(&self, n: isize) -> Vector3 { match n {