Struct nannou::math::Matrix2[][src]

#[repr(C)]
pub struct Matrix2<S> { pub x: Vector2<S>, pub y: Vector2<S>, }

A 2 x 2, column major matrix

This type is marked as #[repr(C)].

Fields

The first column of the matrix.

The second column of the matrix.

Methods

impl<S> Matrix2<S> where
    S: BaseFloat
[src]

Create a new matrix, providing values for each index.

Create a new matrix, providing columns.

Create a transformation matrix that will cause a vector to point at dir, using up for orientation.

impl<S> Matrix2<S> where
    S: Copy + NumCast
[src]

Component-wise casting to another type

Trait Implementations

impl<S> IndexMut<usize> for Matrix2<S>
[src]

Performs the mutable indexing (container[index]) operation.

impl<S> Rand for Matrix2<S> where
    S: BaseFloat + Rand
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl<S> SquareMatrix for Matrix2<S> where
    S: BaseFloat
[src]

The row/column vector of the matrix. Read more

Create a new diagonal matrix using the supplied value.

Create a matrix from a non-uniform scale

Transpose this matrix in-place.

Take the determinant of this matrix.

Return a vector containing the diagonal of this matrix.

Invert this matrix, returning a new matrix. m.mul_m(m.invert()) is the identity matrix. Returns None if this matrix is not invertible (has a determinant of zero). Read more

Test if this is a diagonal matrix. That is, every element outside of the diagonal is 0. Read more

Test if this matrix is symmetric. That is, it is equal to its transpose. Read more

The [identity matrix]. Multiplying this matrix with another should have no effect. Read more

Return the trace of this matrix. That is, the sum of the diagonal.

Test if this matrix is invertible.

Test if this matrix is the identity matrix. That is, it is diagonal and every element in the diagonal is one. Read more

impl<S> Sub<Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, 'b, S> Sub<&'a Matrix2<S>> for &'b Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<&'a Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<Matrix2<S>> for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<S> Clone for Matrix2<S> where
    S: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S> VectorSpace for Matrix2<S> where
    S: BaseFloat
[src]

The associated scalar.

impl<S> MulAssign<S> for Matrix2<S> where
    S: BaseFloat + MulAssign<S>, 
[src]

Performs the *= operation.

impl<S> Debug for Matrix2<S> where
    S: Debug
[src]

Formats the value using the given formatter. Read more

impl<S> Sum<Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

Method which takes an iterator and generates Self from the elements by "summing up" the items. Read more

impl<'a, S> Sum<&'a Matrix2<S>> for Matrix2<S> where
    S: 'a + BaseFloat
[src]

Method which takes an iterator and generates Self from the elements by "summing up" the items. Read more

impl<'a> Mul<&'a Matrix2<i16>> for i16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<&'a Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<u8>> for u8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<u8>> for u8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<f32>> for f32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<f64>> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<usize>> for usize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<i64>> for i64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<f32>> for f32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<isize>> for isize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<u32>> for u32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<S> for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<u16>> for u16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, 'b, S> Mul<&'a Matrix2<S>> for &'b Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<isize>> for isize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<Vector2<S>> for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<i16>> for i16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<u64>> for u64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<i32>> for i32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<Matrix2<S>> for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> Mul<S> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<u16>> for u16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<usize>> for usize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<u64>> for u64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<i64>> for i64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, 'b, S> Mul<&'a Vector2<S>> for &'b Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<u32>> for u32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<i32>> for i32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> Mul<Vector2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Matrix2<i8>> for i8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<f64>> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> Mul<Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Matrix2<i8>> for i8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<&'a Vector2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> RemAssign<S> for Matrix2<S> where
    S: BaseFloat + RemAssign<S>, 
[src]

Performs the %= operation.

impl<'de, S> Deserialize<'de> for Matrix2<S> where
    S: Deserialize<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<S> AsRef<[[S; 2]; 2]> for Matrix2<S>
[src]

Performs the conversion.

impl<S> AsRef<[S; 4]> for Matrix2<S>
[src]

Performs the conversion.

impl<S> AsRef<Matrix2<S>> for Basis2<S> where
    S: BaseFloat
[src]

Performs the conversion.

impl<'a, S> Neg for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl<S> Neg for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl<S> AddAssign<Matrix2<S>> for Matrix2<S> where
    S: BaseFloat + AddAssign<S>, 
[src]

Performs the += operation.

impl<S> From<Basis2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

Performs the conversion.

impl<S> From<Matrix2<S>> for Matrix3<S> where
    S: BaseFloat
[src]

Clone the elements of a 2-dimensional matrix into the top-left corner of a 3-dimensional identity matrix.

impl<'a, S> From<&'a mut [S; 4]> for &'a mut Matrix2<S>
[src]

Performs the conversion.

impl<S> From<[[S; 2]; 2]> for Matrix2<S> where
    S: Copy
[src]

Performs the conversion.

impl<S> From<Matrix2<S>> for Matrix4<S> where
    S: BaseFloat
[src]

Clone the elements of a 2-dimensional matrix into the top-left corner of a 4-dimensional identity matrix.

impl<'a, S> From<&'a [[S; 2]; 2]> for &'a Matrix2<S>
[src]

Performs the conversion.

impl<'a, S> From<&'a [S; 4]> for &'a Matrix2<S>
[src]

Performs the conversion.

impl<'a, S> From<&'a mut [[S; 2]; 2]> for &'a mut Matrix2<S>
[src]

Performs the conversion.

impl<S> Into<[[S; 2]; 2]> for Matrix2<S>
[src]

Performs the conversion.

impl<S> ApproxEq for Matrix2<S> where
    S: BaseFloat
[src]

Used for specifying relative comparisons.

The default tolerance to use when testing values that are close together. Read more

The default relative tolerance for testing values that are far-apart. Read more

The default ULPs to tolerate when testing values that are far-apart. Read more

A test for equality that uses a relative comparison if the values are far apart.

A test for equality that uses units in the last place (ULP) if the values are far apart.

The inverse of ApproxEq::relative_eq.

The inverse of ApproxEq::ulps_eq.

impl<S> Index<usize> for Matrix2<S>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<S> One for Matrix2<S> where
    S: BaseFloat
[src]

Returns the multiplicative identity element of Self, 1. Read more

Returns true if self is equal to the multiplicative identity. Read more

impl<'a, S> Add<&'a Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, S> Add<Matrix2<S>> for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<S> Add<Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, 'b, S> Add<&'a Matrix2<S>> for &'b Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<S> Serialize for Matrix2<S> where
    S: Serialize
[src]

Serialize this value into the given Serde serializer. Read more

impl<S> Matrix for Matrix2<S> where
    S: BaseFloat
[src]

The column vector of the matrix.

The row vector of the matrix.

The result of transposing the matrix

Get a row from this matrix by-value.

Swap two rows of this array.

Swap two columns of this array.

Swap the values at index a and b

Transpose this matrix, returning a new matrix.

Get the pointer to the first element of the array.

Get a mutable pointer to the first element of the array.

Replace a column in the array.

impl<S> Zero for Matrix2<S> where
    S: BaseFloat
[src]

Returns the additive identity element of Self, 0. Read more

Returns true if self is equal to the additive identity.

impl<S> Product<Matrix2<S>> for Matrix2<S> where
    S: BaseFloat
[src]

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more

impl<'a, S> Product<&'a Matrix2<S>> for Matrix2<S> where
    S: 'a + BaseFloat
[src]

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more

impl<'a> Rem<&'a Matrix2<u8>> for u8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a, S> Rem<S> for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<usize>> for usize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<S> Rem<S> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<i32>> for i32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<isize>> for isize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<i8>> for i8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<u32>> for u32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<i8>> for i8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<f64>> for f64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<i16>> for i16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<f64>> for f64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<u8>> for u8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<u16>> for u16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<f32>> for f32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<usize>> for usize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<isize>> for isize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<u64>> for u64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<u16>> for u16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<u32>> for u32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<i32>> for i32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<i64>> for i64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Matrix2<i16>> for i16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<f32>> for f32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<i64>> for i64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Matrix2<u64>> for u64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<S> SubAssign<Matrix2<S>> for Matrix2<S> where
    S: BaseFloat + SubAssign<S>, 
[src]

Performs the -= operation.

impl<S> AsMut<[S; 4]> for Matrix2<S>
[src]

Performs the conversion.

impl<S> AsMut<[[S; 2]; 2]> for Matrix2<S>
[src]

Performs the conversion.

impl<S> DivAssign<S> for Matrix2<S> where
    S: BaseFloat + DivAssign<S>, 
[src]

Performs the /= operation.

impl<S> Copy for Matrix2<S> where
    S: Copy
[src]

impl<S> PartialEq<Matrix2<S>> for Matrix2<S> where
    S: PartialEq<S>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Div<&'a Matrix2<i16>> for i16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<u64>> for u64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<u32>> for u32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<i8>> for i8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<f64>> for f64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<isize>> for isize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<f64>> for f64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<i64>> for i64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<u8>> for u8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<i16>> for i16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<usize>> for usize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<S> Div<S> for Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<u16>> for u16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<u32>> for u32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<i64>> for i64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<f32>> for f32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<i32>> for i32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<i32>> for i32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a, S> Div<S> for &'a Matrix2<S> where
    S: BaseFloat
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<usize>> for usize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Matrix2<u8>> for u8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<u64>> for u64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<isize>> for isize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<u16>> for u16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<f32>> for f32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Matrix2<i8>> for i8
[src]

The resulting type after applying the / operator.

Performs the / operation.

Auto Trait Implementations

impl<S> Send for Matrix2<S> where
    S: Send

impl<S> Sync for Matrix2<S> where
    S: Sync