From 79008262cb2c203ca084ca06aa37e5015c39ed93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sun, 19 Jan 2014 15:48:07 +0100 Subject: [PATCH] Doc: fix some typos. --- src/na.rs | 8 ++++---- src/structs/crout.rs | 2 +- src/structs/dmat.rs | 8 ++++---- src/structs/dvec.rs | 12 ++++++------ src/traits/geometry.rs | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/na.rs b/src/na.rs index b4bfaf4d..feee5fb9 100644 --- a/src/na.rs +++ b/src/na.rs @@ -271,7 +271,7 @@ pub fn append_rotation>(m: &M, v: &V) -> M { /// pub main() { /// let t = Rot3::new(Vec3::new(0.0, 0.0, 0.0)); /// let v = Vec3::new(1.0, 1.0, 1.0); -/// let rt = na::preend_rotation(&t, &v); +/// let rt = na::prepend_rotation(&t, &v); /// /// assert!(na::rotation(&rt) == Vec3::new(1.0, 1.0, 1.0)) /// } @@ -331,7 +331,7 @@ pub fn inv_rotate>(m: &M, v: &V) -> V { * RotationWithTranslation */ -/// Rotates a copy of `m` by `amount` using `center` ase the pivot point. +/// Rotates a copy of `m` by `amount` using `center` as the pivot point. #[inline(always)] pub fn append_rotation_wrt_point, AV, @@ -473,7 +473,7 @@ pub fn cross_matrix, M>(v: &V) -> M { * ToHomogeneous */ -/// Converts a matrix or vector to homogoneous coordinates. +/// Converts a matrix or vector to homogeneous coordinates. #[inline(always)] pub fn to_homogeneous, Res>(m: &M) -> Res { ToHomogeneous::to_homogeneous(m) @@ -483,7 +483,7 @@ pub fn to_homogeneous, Res>(m: &M) -> Res { * FromHomogeneous */ -/// Converts a matrix or vector from homogoneous coordinates. +/// Converts a matrix or vector from homogeneous coordinates. /// /// w-normalization is appied. #[inline(always)] diff --git a/src/structs/crout.rs b/src/structs/crout.rs index 0c5c762b..db43a5b8 100644 --- a/src/structs/crout.rs +++ b/src/structs/crout.rs @@ -1,6 +1,6 @@ use lower_triangular::LowerTriangularMat; pub trait Crout { - /// Crout LDL* factorization for a symetric definite indefinite matrix. + /// Crout LDL* factorization for a symmetric definite indefinite matrix. fn crout(self, &mut DiagonalMat) -> LowerTriangularMat; } diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index bca8a2b9..e884f47c 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -189,8 +189,8 @@ impl DMat { /// Builds an identity matrix. /// /// # Arguments - /// * `dim` - The dimension of the matrix. A `dim`-dimensional matrix contains `dim * dim` - /// components. + /// * `dim` - The dimension of the matrix. A `dim`-dimensional matrix contains `dim * dim` + /// components. #[inline] pub fn new_identity(dim: uint) -> DMat { let mut res = DMat::new_zeros(dim, dim); @@ -232,8 +232,8 @@ impl DMat { /// Reads the value of a component of the matrix. /// /// # Arguments - /// * `row` - 0-based index of the line to be read - /// * `col` - 0-based index of the column to be read + /// * `row` - 0-based index of the line to be read + /// * `col` - 0-based index of the column to be read #[inline] pub fn at(&self, row: uint, col: uint) -> N { assert!(row < self.nrows); diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index 77ffe8e6..edbfa701 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -36,7 +36,7 @@ impl DVec { /// Builds a vector filled with zeros. /// /// # Arguments - /// * `dim` - The dimension of the vector. + /// * `dim` - The dimension of the vector. #[inline] pub fn new_zeros(dim: uint) -> DVec { DVec::from_elem(dim, Zero::zero()) @@ -60,7 +60,7 @@ impl DVec { /// Builds a vector filled with ones. /// /// # Arguments - /// * `dim` - The dimension of the vector. + /// * `dim` - The dimension of the vector. #[inline] pub fn new_ones(dim: uint) -> DVec { DVec::from_elem(dim, One::one()) @@ -92,7 +92,7 @@ impl DVec { *self.at.unsafe_mut_ref(i) = val } - /// Gets a reference to of this vector datas. + /// Gets a reference to of this vector data. #[inline] pub fn as_vec<'r>(&'r self) -> &'r [N] { let data: &'r [N] = self.at; @@ -100,7 +100,7 @@ impl DVec { data } - /// Gets a mutable reference to of this vector datas. + /// Gets a mutable reference to of this vector data. #[inline] pub fn as_mut_vec<'r>(&'r mut self) -> &'r mut [N] { let data: &'r mut [N] = self.at; @@ -108,7 +108,7 @@ impl DVec { data } - /// Extracts this vector datas. + /// Extracts this vector data. #[inline] pub fn to_vec(self) -> ~[N] { self.at @@ -179,7 +179,7 @@ impl FromIterator for DVec { impl + DVecMulRhs>> DVec { /// Computes the canonical basis for the given dimension. A canonical basis is a set of - /// vectors, mutually orthogonal, with all its component equal to 0.0 exept one which is equal + /// vectors, mutually orthogonal, with all its component equal to 0.0 except one which is equal /// to 1.0. pub fn canonical_basis_with_dim(dim: uint) -> ~[DVec] { let mut res : ~[DVec] = ~[]; diff --git a/src/traits/geometry.rs b/src/traits/geometry.rs index 333f1afd..91fdf4b3 100644 --- a/src/traits/geometry.rs +++ b/src/traits/geometry.rs @@ -153,7 +153,7 @@ pub trait RotationMatrix + Rotation> : Rotation { pub trait AbsoluteRotate { /// This is the same as: /// - /// ~~~{.rust} + /// ~~~ /// self.rotation_matrix().absolute().rmul(v) /// ~~~ fn absolute_rotate(&self, v: &V) -> V; @@ -208,7 +208,7 @@ pub trait Dot { * computing intermediate vectors. * The following equation must be verified: * - * ~~~{.rust} + * ~~~ * a.sub_dot(b, c) == (a - b).dot(c) * ~~~ *