Merge pull request #397 from phaazon/doc-typos
Fixed documentation typo(s)
This commit is contained in:
commit
e8cccf9742
4 changed files with 10 additions and 10 deletions
|
@ -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<Euler<A>>` conversions
|
||||
/// quaternion or a rotation matrix. To this end, `From<Euler<A>>` conversions
|
||||
/// are provided for the following types:
|
||||
///
|
||||
/// - [`Basis3`](struct.Basis3.html)
|
||||
|
|
|
@ -74,13 +74,13 @@ impl Into<Simdf32x4> for Quaternion<f32> {
|
|||
|
||||
impl<S: BaseFloat> Quaternion<S> {
|
||||
/// 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<S> {
|
||||
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<S>) -> Quaternion<S> {
|
||||
Quaternion { s: s, v: v }
|
||||
|
@ -559,7 +559,7 @@ impl<S: BaseFloat> ApproxEq for Quaternion<S> {
|
|||
}
|
||||
|
||||
impl<S: BaseFloat> From<Quaternion<S>> for Matrix3<S> {
|
||||
/// Convert the quaternion to a 3 x 3 rotation matrix
|
||||
/// Convert the quaternion to a 3 x 3 rotation matrix.
|
||||
fn from(quat: Quaternion<S>) -> Matrix3<S> {
|
||||
let x2 = quat.v.x + quat.v.x;
|
||||
let y2 = quat.v.y + quat.v.y;
|
||||
|
@ -584,7 +584,7 @@ impl<S: BaseFloat> From<Quaternion<S>> for Matrix3<S> {
|
|||
}
|
||||
|
||||
impl<S: BaseFloat> From<Quaternion<S>> for Matrix4<S> {
|
||||
/// Convert the quaternion to a 4 x 4 rotation matrix
|
||||
/// Convert the quaternion to a 4 x 4 rotation matrix.
|
||||
fn from(quat: Quaternion<S>) -> Matrix4<S> {
|
||||
let x2 = quat.v.x + quat.v.x;
|
||||
let y2 = quat.v.y + quat.v.y;
|
||||
|
|
|
@ -34,7 +34,7 @@ pub trait Rotation<P: EuclideanSpace>: Sized + Copy + One where
|
|||
Self: ApproxEq<Epsilon = <P as EuclideanSpace>::Scalar>,
|
||||
<P as EuclideanSpace>::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<S: fmt::Debug> fmt::Debug for Basis2<S> {
|
|||
/// 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))]
|
||||
|
|
|
@ -110,7 +110,7 @@ macro_rules! impl_vector {
|
|||
}
|
||||
|
||||
impl<S: NumCast + Copy> $VectorN<S> {
|
||||
/// Component-wise casting to another type
|
||||
/// Component-wise casting to another type.
|
||||
#[inline]
|
||||
pub fn cast<T: NumCast>(&self) -> $VectorN<T> {
|
||||
$VectorN { $($field: NumCast::from(self.$field).unwrap()),+ }
|
||||
|
@ -318,7 +318,7 @@ macro_rules! impl_vector_default {
|
|||
}
|
||||
|
||||
impl<S: NumCast + Copy> $VectorN<S> {
|
||||
/// Component-wise casting to another type
|
||||
/// Component-wise casting to another type.
|
||||
#[inline]
|
||||
pub fn cast<T: NumCast>(&self) -> $VectorN<T> {
|
||||
$VectorN { $($field: NumCast::from(self.$field).unwrap()),+ }
|
||||
|
@ -665,7 +665,7 @@ impl<S: BaseNum> Vector4<S> {
|
|||
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<S> {
|
||||
match n {
|
||||
|
|
Loading…
Reference in a new issue