Struct euler::Mat2
[−]
[src]
#[repr(C)]pub struct Mat2(_);
2x2 column major matrix.
Methods
impl Mat2
[src]
fn identity() -> Self
[src]
Returns the identity matrix.
fn invert(self) -> Mat2
[src]
fn try_invert(self) -> Option<Mat2>
[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]
fn clone(&self) -> Mat2
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Mat2
[src]
impl Debug for Mat2
[src]
impl PartialEq for Mat2
[src]
fn eq(&self, __arg_0: &Mat2) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Mat2) -> bool
[src]
This method tests for !=
.
impl AsRef<[[f32; 2]; 2]> for Mat2
[src]
impl From<Matrix2<f32>> for Mat2
[src]
impl From<[[f32; 2]; 2]> for Mat2
[src]
impl Into<[[f32; 2]; 2]> for Mat2
[src]
impl Mul<Mat2> for Mat2
[src]
type Output = Mat2
The resulting type after applying the *
operator.
fn mul(self, rhs: Mat2) -> Self::Output
[src]
Performs the *
operation.
impl Mul<Vec2> for Mat2
[src]
type Output = Vec2
The resulting type after applying the *
operator.
fn mul(self, rhs: Vec2) -> Self::Output
[src]
Performs the *
operation.
impl<'a> Mul<Vec2> for &'a Mat2
[src]
type Output = Vec2
The resulting type after applying the *
operator.
fn mul(self, rhs: Vec2) -> Self::Output
[src]
Performs the *
operation.
impl ApproxEq for Mat2
[src]
type Epsilon = <f32 as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
The inverse of ApproxEq::ulps_eq
.
impl From<ColumnMatrix2<f32>> for Mat2
[src]
fn from(m: ColumnMatrix2<f32>) -> Self
[src]
Performs the conversion.
impl Into<ColumnMatrix2<f32>> for Mat2
[src]
fn into(self) -> ColumnMatrix2<f32>
[src]
Performs the conversion.