Struct euler::Mat2 [] [src]

#[repr(C)]
pub struct Mat2(_);

2x2 column major matrix.

Methods

impl Mat2
[src]

[src]

Returns the identity matrix.

[src]

Computes the inverse of this matrix.

Panics

Panics if the matrix is not invertible.

[src]

Computes the inverse of this matrix, returning None if non-invertible.

Examples

let m = mat2!();
assert_eq!(m.try_invert(), Some(mat2!()));
let m = mat2!(
    0.0, 0.0,
    0.0, 0.0,
);
assert_eq!(m.try_invert(), None);

Trait Implementations

impl Clone for Mat2
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Mat2
[src]

impl Debug for Mat2
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for Mat2
[src]

[src]

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

[src]

This method tests for !=.

impl AsRef<[[f32; 2]; 2]> for Mat2
[src]

[src]

Performs the conversion.

impl From<Matrix2<f32>> for Mat2
[src]

[src]

Performs the conversion.

impl From<[[f32; 2]; 2]> for Mat2
[src]

[src]

Performs the conversion.

impl Into<[[f32; 2]; 2]> for Mat2
[src]

[src]

Performs the conversion.

impl Mul<Mat2> for Mat2
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Vec2> for Mat2
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> Mul<Vec2> for &'a Mat2
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl ApproxEq for Mat2
[src]

Used for specifying relative comparisons.

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

The inverse of ApproxEq::relative_eq.

[src]

The inverse of ApproxEq::ulps_eq.

impl From<ColumnMatrix2<f32>> for Mat2
[src]

[src]

Performs the conversion.

impl Into<ColumnMatrix2<f32>> for Mat2
[src]

[src]

Performs the conversion.