Struct DMat3

Source
#[repr(C)]
pub struct DMat3 { pub m00: f64, pub m01: f64, pub m02: f64, pub m10: f64, pub m11: f64, pub m12: f64, pub m20: f64, pub m21: f64, pub m22: f64, }
Expand description

Double-precision 2x2 column major matrix.

Fields§

§m00: f64§m01: f64§m02: f64§m10: f64§m11: f64§m12: f64§m20: f64§m21: f64§m22: f64

Implementations§

Source§

impl DMat3

Source

pub fn new( m00: f64, m01: f64, m02: f64, m10: f64, m11: f64, m12: f64, m20: f64, m21: f64, m22: f64, ) -> Self

Full constructor.

Source

pub fn identity() -> Self

Identity constructor.

Source

pub fn diagonal(di: f64) -> Self

Diagonal constructor.

Source

pub fn tridiagonal(lo: f64, di: f64, up: f64) -> Self

Tri-diagonal constructor.

Source§

impl DMat3

Source

pub fn determinant(self) -> f64

Computes the matrix determinant.

Source

pub fn trace(self) -> f64

Computes the matrix trace.

Source

pub fn inverse(self) -> DMat3

Computes the matrix inverse.

§Panics

Panics if the matrix has no inverse (i.e. has zero determinant).

Source

pub fn transpose(self) -> DMat3

Returns the matrix transpose.

Source

pub fn try_invert(self) -> Option<DMat3>

Attempts to compute the matrix inverse, returning None if the matrix is non-invertible (i.e. has zero determinant).

Trait Implementations§

Source§

impl Add for DMat3

Source§

type Output = DMat3

The resulting type after applying the + operator.
Source§

fn add(self, rhs: DMat3) -> Self::Output

Performs the + operation. Read more
Source§

impl ApproxEq for DMat3

Source§

type Epsilon = <Matrix3<f64> as ApproxEq>::Epsilon

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> Self::Epsilon

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

fn default_max_relative() -> Self::Epsilon

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

fn default_max_ulps() -> u32

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

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.
Source§

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.
Source§

fn relative_ne( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of ApproxEq::relative_eq.
Source§

fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of ApproxEq::ulps_eq.
Source§

impl AsRef<[[f64; 3]; 3]> for DMat3

Source§

fn as_ref(&self) -> &[[f64; 3]; 3]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for DMat3

Source§

fn clone(&self) -> DMat3

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DMat3

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DMat3

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for DMat3

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<[[f64; 3]; 3]> for DMat3

Source§

fn from(array: [[f64; 3]; 3]) -> Self

Converts to this type from the input type.
Source§

impl From<DMat2> for DMat3

Source§

fn from(arg: DMat2) -> Self

Converts to this type from the input type.
Source§

impl From<DMat3> for DMat2

Source§

fn from(arg: DMat3) -> Self

Converts to this type from the input type.
Source§

impl From<DMat3> for DMat4

Source§

fn from(arg: DMat3) -> Self

Converts to this type from the input type.
Source§

impl From<DMat3> for Mat2

Source§

fn from(arg: DMat3) -> Self

Converts to this type from the input type.
Source§

impl From<DMat3> for Mat3

Source§

fn from(arg: DMat3) -> Self

Converts to this type from the input type.
Source§

impl From<DMat3> for Mat4

Source§

fn from(arg: DMat3) -> Self

Converts to this type from the input type.
Source§

impl From<DMat4> for DMat3

Source§

fn from(arg: DMat4) -> Self

Converts to this type from the input type.
Source§

impl From<Mat2> for DMat3

Source§

fn from(arg: Mat2) -> Self

Converts to this type from the input type.
Source§

impl From<Mat3> for DMat3

Source§

fn from(arg: Mat3) -> Self

Converts to this type from the input type.
Source§

impl From<Mat4> for DMat3

Source§

fn from(arg: Mat4) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for DMat3

Source§

fn from(arg: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for DMat3

Source§

fn from(arg: f64) -> Self

Converts to this type from the input type.
Source§

impl Into<[[f64; 3]; 3]> for DMat3

Source§

fn into(self) -> [[f64; 3]; 3]

Converts this type into the (usually inferred) input type.
Source§

impl Mul<DMat3> for f64

Source§

type Output = DMat3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DMat3) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<DVec3> for &'a DMat3

Source§

type Output = DVec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DVec3) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<DVec3> for DMat3

Source§

type Output = DVec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DVec3) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<f64> for DMat3

Source§

type Output = DMat3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f64) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for DMat3

Source§

type Output = DMat3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DMat3) -> Self::Output

Performs the * operation. Read more
Source§

impl PartialEq for DMat3

Source§

fn eq(&self, other: &DMat3) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Sub for DMat3

Source§

type Output = DMat3

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: DMat3) -> Self::Output

Performs the - operation. Read more
Source§

impl Copy for DMat3

Source§

impl StructuralPartialEq for DMat3

Auto Trait Implementations§

§

impl Freeze for DMat3

§

impl RefUnwindSafe for DMat3

§

impl Send for DMat3

§

impl Sync for DMat3

§

impl Unpin for DMat3

§

impl UnwindSafe for DMat3

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.