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 8fabb7d..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'. 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 {