Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored and sebcrozet committed Oct 16, 2018
1 parent 9999b27 commit c04afbd
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -23,7 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
* The `Affine` trait now has methods for appending/prepending pure
translation/rotation/scaling.
* `EuclideanSpace::Vector` has been renamed `EuclideanSpace::Coordinates`.
* Added `Rotation::scaled_rotation_between` wich is a combination of
* Added `Rotation::scaled_rotation_between` which is a combination of
`Rotation::rotation_between` and `Rotation::powf`.
* `FiniteDimVectorSpace` looses `::component` but gains the
`::component_unchecked_mut` method (for mutable compoent borrowing without
Expand Down
4 changes: 2 additions & 2 deletions alga/src/general/lattice.rs
Expand Up @@ -8,13 +8,13 @@ pub trait MeetSemilattice: Sized {
fn meet(&self, other: &Self) -> Self;
}

/// A set where every two elements have a suppremum (i.e. smallest upper bound).
/// A set where every two elements have a supremum (i.e. smallest upper bound).
pub trait JoinSemilattice: Sized {
/// Returns the join (aka. supremum) of two values.
fn join(&self, other: &Self) -> Self;
}

/// Partially orderable sets where every two elements have a suppremum and infimum.
/// Partially orderable sets where every two elements have a supremum and infimum.
pub trait Lattice: MeetSemilattice + JoinSemilattice + PartialOrd {
/// Returns the infimum and the supremum simultaneously.
#[inline]
Expand Down
2 changes: 1 addition & 1 deletion alga/src/general/one_operator.rs
Expand Up @@ -114,7 +114,7 @@ pub trait AbstractSemigroup<O: Operator>: PartialEq + AbstractMagma<O> {
}
}

/// Implements the semigroup trait for types provded.
/// Implements the semigroup trait for types provided.
/// # Examples
///
/// ```
Expand Down
10 changes: 5 additions & 5 deletions alga/src/general/operator.rs
Expand Up @@ -19,7 +19,7 @@ pub trait Inverse<O: Operator>: Sized {
/// Returns the inverse of `self`, relative to the operator `O`.
fn inverse(&self) -> Self;

/// In-place inversin of `self`.
/// In-place inversion of `self`.
#[inline]
fn inverse_mut(&mut self) {
*self = self.inverse()
Expand Down Expand Up @@ -118,16 +118,16 @@ impl<N: Num + Clone + ClosedNeg> Inverse<Multiplicative> for Complex<N> {
}
}

/// [Alias] Trait alias for `Add` and `AddAsign` with result of type `Self`.
/// [Alias] Trait alias for `Add` and `AddAssign` with result of type `Self`.
pub trait ClosedAdd<Right = Self>: Sized + Add<Right, Output = Self> + AddAssign<Right> {}

/// [Alias] Trait alias for `Sub` and `SubAsign` with result of type `Self`.
/// [Alias] Trait alias for `Sub` and `SubAssign` with result of type `Self`.
pub trait ClosedSub<Right = Self>: Sized + Sub<Right, Output = Self> + SubAssign<Right> {}

/// [Alias] Trait alias for `Mul` and `MulAsign` with result of type `Self`.
/// [Alias] Trait alias for `Mul` and `MulAssign` with result of type `Self`.
pub trait ClosedMul<Right = Self>: Sized + Mul<Right, Output = Self> + MulAssign<Right> {}

/// [Alias] Trait alias for `Div` and `DivAsign` with result of type `Self`.
/// [Alias] Trait alias for `Div` and `DivAssign` with result of type `Self`.
pub trait ClosedDiv<Right = Self>: Sized + Div<Right, Output = Self> + DivAssign<Right> {}

/// [Alias] Trait alias for `Neg` with result of type `Self`.
Expand Down
4 changes: 2 additions & 2 deletions alga/src/general/real.rs
Expand Up @@ -24,8 +24,8 @@ use num;
/// Reals are equipped with functions that are commonly used on reals. The results of those
/// functions only have to be approximately equal to the actual theoretical values.
// FIXME: SubsetOf should be removed when specialization will be supported by rustc. This will
// allow a blancket impl: impl<T: Clone> SubsetOf<T> for T { ... }
// NOTE: make all types debuggable/'static/Any ? This seems essencial for any kind of generic programming.
// allow a blanket impl: impl<T: Clone> SubsetOf<T> for T { ... }
// NOTE: make all types debuggable/'static/Any ? This seems essential for any kind of generic programming.
pub trait Real:
SubsetOf<Self>
+ SupersetOf<f64>
Expand Down
8 changes: 4 additions & 4 deletions alga/src/general/subset.rs
Expand Up @@ -15,11 +15,11 @@ use decimal::d128;
/// practice f64 has more elements).
/// * u32 and i8 are respectively supposed to represent natural and relative numbers. Thus, u32 is
/// a subset of i8.
/// * A quaterion and a 3x3 orthogonal matrix with unit determinant are both sets of rotations.
/// * A quaternion and a 3x3 orthogonal matrix with unit determinant are both sets of rotations.
/// They can thus be considered equal.
///
/// In other words, implementation details due to machine limitations are ignored (otherwise we
/// could not even, e.g., convert a u64 to an i64). If considering those limintations are
/// could not even, e.g., convert a u64 to an i64). If considering those limitations are
/// important, other crates allowing you to query the limitations of given types should be used.
pub trait SubsetOf<T>: Sized {
/// The inclusion map: converts `self` to the equivalent element of its superset.
Expand Down Expand Up @@ -55,11 +55,11 @@ pub trait SubsetOf<T>: Sized {
/// practice f64 has more elements).
/// * u32 and i8 are respectively supposed to represent natural and relative numbers. Thus, i8 is
/// a superset of u32.
/// * A quaterion and a 3x3 orthogonal matrix with unit determinant are both sets of rotations.
/// * A quaternion and a 3x3 orthogonal matrix with unit determinant are both sets of rotations.
/// They can thus be considered equal.
///
/// In other words, implementation details due to machine limitations are ignored (otherwise we
/// could not even, e.g., convert a u64 to an i64). If considering those limintations are
/// could not even, e.g., convert a u64 to an i64). If considering those limitations are
/// important, other crates allowing you to query the limitations of given types should be used.
pub trait SupersetOf<T>: Sized {
/// The inverse inclusion map: attempts to construct `self` from the equivalent element of its
Expand Down
2 changes: 1 addition & 1 deletion alga/src/linear/transformation.rs
Expand Up @@ -228,7 +228,7 @@ pub trait Translation<E: EuclideanSpace>
: DirectIsometry<E, Translation = Self, Rotation = Id> /* + SubsetOf<E::Coordinates> */ {
// NOTE: we must define those two conversions here (instead of just using SubsetOf) because the
// structure of Self uses the multiplication for composition, while E::Coordinates uses addition.
// Having a trait that sais "remap this operator to this other one" does not seem to be
// Having a trait that says "remap this operator to this other one" does not seem to be
// possible without higher kinded traits.
/// Converts this translation to a vector.
fn to_vector(&self) -> E::Coordinates;
Expand Down
6 changes: 3 additions & 3 deletions alga/src/linear/vector.rs
Expand Up @@ -33,14 +33,14 @@ pub trait NormedSpace: VectorSpace {

/// Normalizes this vector in-place or does nothing if its norm is smaller or equal to `eps`.
///
/// If the normalization succeded, returns the old normal of this vector.
/// If the normalization succeeded, returns the old normal of this vector.
fn try_normalize_mut(&mut self, eps: Self::Field) -> Option<Self::Field>;
}

/// A vector space aquipped with an inner product.
/// A vector space equipped with an inner product.
///
/// It must be a normed space as well and the norm must agree with the inner product.
/// The inner product must be symmetric, linear in its first agurment, and positive definite.
/// The inner product must be symmetric, linear in its first aguement, and positive definite.
pub trait InnerSpace: NormedSpace<Field = <Self as InnerSpace>::Real> {
/// The result of inner product (same as the field used by this vector space).
type Real: Real;
Expand Down
2 changes: 1 addition & 1 deletion alga_derive/src/lib.rs
Expand Up @@ -35,7 +35,7 @@
//! If `#[alga_quickcheck]` attribute is added for the target of the derive,
//! then `quickcheck` tests will be generated.
//! These tests will check that the algebraic properties of the derived trait are true for the type.
//! This attribute requires `quickcheck`s `Arbitary` trait to be implemented for the target of the derive.
//! This attribute requires `quickcheck`s `Arbitrary` trait to be implemented for the target of the derive.
//!
//! ~~~.ignore
//! extern crate alga;
Expand Down

0 comments on commit c04afbd

Please sign in to comment.