Struct euler::DMat2 [−][src]
Double-precision 2x2 column major matrix.
Fields
m00: f64
m01: f64
m10: f64
m11: f64
Methods
impl DMat2
[src]
impl DMat2
pub fn new(m00: f64, m01: f64, m10: f64, m11: f64) -> Self
[src]
pub fn new(m00: f64, m01: f64, m10: f64, m11: f64) -> Self
Full constructor.
pub fn identity() -> Self
[src]
pub fn identity() -> Self
Identity constructor.
pub fn diagonal(di: f64) -> Self
[src]
pub fn diagonal(di: f64) -> Self
Diagonal constructor.
pub fn tridiagonal(lo: f64, di: f64, up: f64) -> Self
[src]
pub fn tridiagonal(lo: f64, di: f64, up: f64) -> Self
Tri-diagonal constructor.
impl DMat2
[src]
impl DMat2
pub fn determinant(self) -> f64
[src]
pub fn determinant(self) -> f64
Computes the matrix determinant.
pub fn trace(self) -> f64
[src]
pub fn trace(self) -> f64
Computes the matrix trace.
pub fn inverse(self) -> DMat2
[src]
pub fn inverse(self) -> DMat2
Computes the matrix inverse.
Panics
Panics if the matrix has no inverse (i.e. has zero determinant).
pub fn transpose(self) -> DMat2
[src]
pub fn transpose(self) -> DMat2
Returns the matrix transpose.
pub fn try_invert(self) -> Option<DMat2>
[src]
pub fn try_invert(self) -> Option<DMat2>
Attempts to compute the matrix inverse, returning None
if the matrix is
non-invertible (i.e. has zero determinant).
Trait Implementations
impl From<DMat2> for Mat2
[src]
impl From<DMat2> for Mat2
impl Clone for DMat2
[src]
impl Clone for DMat2
fn clone(&self) -> DMat2
[src]
fn clone(&self) -> DMat2
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for DMat2
[src]
impl Copy for DMat2
impl Debug for DMat2
[src]
impl Debug for DMat2
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for DMat2
[src]
impl PartialEq for DMat2
fn eq(&self, other: &DMat2) -> bool
[src]
fn eq(&self, other: &DMat2) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &DMat2) -> bool
[src]
fn ne(&self, other: &DMat2) -> bool
This method tests for !=
.
impl Display for DMat2
[src]
impl Display for DMat2
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<f32> for DMat2
[src]
impl From<f32> for DMat2
impl From<f64> for DMat2
[src]
impl From<f64> for DMat2
impl From<Mat2> for DMat2
[src]
impl From<Mat2> for DMat2
impl From<Mat3> for DMat2
[src]
impl From<Mat3> for DMat2
impl From<DMat3> for DMat2
[src]
impl From<DMat3> for DMat2
impl From<Mat4> for DMat2
[src]
impl From<Mat4> for DMat2
impl From<DMat4> for DMat2
[src]
impl From<DMat4> for DMat2
impl From<DMat2> for Mat3
[src]
impl From<DMat2> for Mat3
impl From<DMat2> for DMat3
[src]
impl From<DMat2> for DMat3
impl From<DMat2> for Mat4
[src]
impl From<DMat2> for Mat4
impl From<DMat2> for DMat4
[src]
impl From<DMat2> for DMat4
impl Add<DMat2> for DMat2
[src]
impl Add<DMat2> for DMat2
type Output = DMat2
The resulting type after applying the +
operator.
fn add(self, rhs: DMat2) -> Self::Output
[src]
fn add(self, rhs: DMat2) -> Self::Output
Performs the +
operation.
impl Sub<DMat2> for DMat2
[src]
impl Sub<DMat2> for DMat2
type Output = DMat2
The resulting type after applying the -
operator.
fn sub(self, rhs: DMat2) -> Self::Output
[src]
fn sub(self, rhs: DMat2) -> Self::Output
Performs the -
operation.
impl Mul<f64> for DMat2
[src]
impl Mul<f64> for DMat2
type Output = DMat2
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> Self::Output
[src]
fn mul(self, rhs: f64) -> Self::Output
Performs the *
operation.
impl Mul<DVec2> for DMat2
[src]
impl Mul<DVec2> for DMat2
type Output = DVec2
The resulting type after applying the *
operator.
fn mul(self, rhs: DVec2) -> Self::Output
[src]
fn mul(self, rhs: DVec2) -> Self::Output
Performs the *
operation.
impl<'a> Mul<DVec2> for &'a DMat2
[src]
impl<'a> Mul<DVec2> for &'a DMat2
type Output = DVec2
The resulting type after applying the *
operator.
fn mul(self, rhs: DVec2) -> Self::Output
[src]
fn mul(self, rhs: DVec2) -> Self::Output
Performs the *
operation.
impl Mul<DMat2> for f64
[src]
impl Mul<DMat2> for f64
type Output = DMat2
The resulting type after applying the *
operator.
fn mul(self, rhs: DMat2) -> Self::Output
[src]
fn mul(self, rhs: DMat2) -> Self::Output
Performs the *
operation.
impl Mul<DMat2> for DMat2
[src]
impl Mul<DMat2> for DMat2
type Output = DMat2
The resulting type after applying the *
operator.
fn mul(self, rhs: DMat2) -> Self::Output
[src]
fn mul(self, rhs: DMat2) -> Self::Output
Performs the *
operation.
impl Default for DMat2
[src]
impl Default for DMat2
impl AsRef<[[f64; 2]; 2]> for DMat2
[src]
impl AsRef<[[f64; 2]; 2]> for DMat2
impl From<[[f64; 2]; 2]> for DMat2
[src]
impl From<[[f64; 2]; 2]> for DMat2
impl Into<[[f64; 2]; 2]> for DMat2
[src]
impl Into<[[f64; 2]; 2]> for DMat2
impl ApproxEq for DMat2
[src]
impl ApproxEq for DMat2
type Epsilon = <Matrix2<f64> as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
fn default_max_ulps() -> u32
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]
fn relative_eq(
&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]
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
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]
fn relative_ne(
&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]
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.