Skip to main content

DMat2

Struct DMat2 

#[repr(C)]
pub struct DMat2 { pub x_axis: DVec2, pub y_axis: DVec2, }
Expand description

A 2x2 column major matrix.

Fields§

§x_axis: DVec2§y_axis: DVec2

Implementations§

§

impl DMat2

pub const ZERO: DMat2

A 2x2 matrix with all elements set to 0.0.

pub const IDENTITY: DMat2

A 2x2 identity matrix, where all diagonal elements are 1, and all off-diagonal elements are 0.

pub const NAN: DMat2

All NAN:s.

pub const fn from_cols(x_axis: DVec2, y_axis: DVec2) -> DMat2

Creates a 2x2 matrix from two column vectors.

See also Self::from_rows when the data is in row major order.

pub const fn from_rows(row0: DVec2, row1: DVec2) -> DMat2

Creates a 2x2 matrix from two row vectors.

Matrices are stored in column major order, so the given rows are permuted into the matrix layout. Use Self::from_cols instead when the data is already in column major order.

pub const fn from_cols_array(m: &[f64; 4]) -> DMat2

Creates a 2x2 matrix from a [f64; 4] array stored in column major order.

If the data is in row major order use Self::from_rows_array instead.

pub const fn to_cols_array(&self) -> [f64; 4]

Creates a [f64; 4] array storing data in column major order.

If you require the data in row major order use Self::to_rows_array instead.

pub const fn from_cols_array_2d(m: &[[f64; 2]; 2]) -> DMat2

Creates a 2x2 matrix from a [[f64; 2]; 2] 2D array stored in column major order.

If the data is in row major order transpose the returned matrix.

pub const fn to_cols_array_2d(&self) -> [[f64; 2]; 2]

Creates a [[f64; 2]; 2] 2D array storing data in column major order.

If you require row major order transpose the matrix first.

pub const fn from_rows_array(m: &[f64; 4]) -> DMat2

Creates a 2x2 matrix from a [f64; 4] array stored in row major order.

Matrices are stored in column major order, so the array is permuted into the matrix layout. Use Self::from_cols_array instead when the data is already in column major order.

pub const fn to_rows_array(&self) -> [f64; 4]

Creates a [f64; 4] array storing data in row major order.

Matrices are stored in column major order, so the array is permuted out of the column major storage. Use Self::to_cols_array instead when you want data in column major order.

pub const fn from_diagonal(diagonal: DVec2) -> DMat2

Creates a 2x2 matrix with its diagonal set to diagonal and all other entries set to 0.

pub fn from_scale_angle(scale: DVec2, angle: f64) -> DMat2

Creates a 2x2 matrix containing the combining non-uniform scale and rotation of angle (in radians).

pub fn from_angle(angle: f64) -> DMat2

Creates a 2x2 matrix containing a rotation of angle (in radians).

pub fn from_mat3(m: DMat3) -> DMat2

Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column.

pub fn from_mat3_minor(m: DMat3, i: usize, j: usize) -> DMat2

Creates a 2x2 matrix from the minor of the given 3x3 matrix, discarding the ith column and jth row.

§Panics

Panics if i or j is greater than 2.

pub const fn from_cols_slice(slice: &[f64]) -> DMat2

Creates a 2x2 matrix from the first 4 values in slice.

See also Self::from_rows_slice when the slice is in row major order.

§Panics

Panics if slice is less than 4 elements long.

pub fn write_cols_to_slice(&self, slice: &mut [f64])

Writes the columns of self to the first 4 elements in slice.

§Panics

Panics if slice is less than 4 elements long.

pub const fn from_rows_slice(slice: &[f64]) -> DMat2

Creates a 2x2 matrix from the first 4 values in slice, stored in row major order.

Matrices are stored in column major order, so the slice is permuted into the matrix layout. Use Self::from_cols_slice instead when the slice is already in column major order.

§Panics

Panics if slice is less than 4 elements long.

pub fn col(&self, index: usize) -> DVec2

Returns the matrix column for the given index.

§Panics

Panics if index is greater than 1.

pub fn col_mut(&mut self, index: usize) -> &mut DVec2

Returns a mutable reference to the matrix column for the given index.

§Panics

Panics if index is greater than 1.

pub fn row(&self, index: usize) -> DVec2

Returns the matrix row for the given index.

See also Self::set_row when you need to change the row.

§Panics

Panics if index is greater than 1.

pub fn set_row(&mut self, index: usize, row: DVec2)

Sets the matrix row for the given index.

Matrices are stored in column major order, so the row is spread across all 2 columns and writing it touches every column. Use Self::col_mut instead when you can work with columns. See also Self::row.

§Panics

Panics if index is greater than 1.

pub fn is_finite(&self) -> bool

Returns true if, and only if, all elements are finite. If any element is either NaN, positive or negative infinity, this will return false.

pub fn is_nan(&self) -> bool

Returns true if any elements are NaN.

pub fn transpose(&self) -> DMat2

Returns the transpose of self.

pub fn diagonal(&self) -> DVec2

Returns the diagonal of self.

pub fn determinant(&self) -> f64

Returns the determinant of self.

pub fn inverse(&self) -> DMat2

Returns the inverse of self.

If the matrix is not invertible the returned matrix will be invalid. The returned matrix will also be invalid if the inverse is not finite, which can happen when self contains very large or very small values. Use Self::try_inverse or Self::inverse_or_zero to detect these cases.

§Panics

Will panic if the resulting inverted matrix is not finite when glam_assert is enabled.

pub fn try_inverse(&self) -> Option<DMat2>

Returns the inverse of self or None if the matrix is not invertible, or if the inverse is not finite.

pub fn inverse_or_zero(&self) -> DMat2

Returns the inverse of self or DMat2::ZERO if the matrix is not invertible, or if the inverse is not finite.

pub fn mul_vec2(&self, rhs: DVec2) -> DVec2

Transforms a 2D vector.

pub fn mul_transpose_vec2(&self, rhs: DVec2) -> DVec2

Transforms a 2D vector by the transpose of self.

pub fn mul_mat2(&self, rhs: &DMat2) -> DMat2

Multiplies two 2x2 matrices.

pub fn add_mat2(&self, rhs: &DMat2) -> DMat2

Adds two 2x2 matrices.

pub fn sub_mat2(&self, rhs: &DMat2) -> DMat2

Subtracts two 2x2 matrices.

pub fn mul_scalar(&self, rhs: f64) -> DMat2

Multiplies a 2x2 matrix by a scalar.

pub fn mul_diagonal_scale(&self, scale: DVec2) -> DMat2

Multiply self by a scaling vector scale. This is faster than creating a whole diagonal scaling matrix and then multiplying that. This operation is commutative.

pub fn div_scalar(&self, rhs: f64) -> DMat2

Divides a 2x2 matrix by a scalar.

pub fn recip(&self) -> DMat2

Returns a matrix containing the reciprocal 1.0/n of each element of self.

pub fn abs_diff_eq(&self, rhs: DMat2, max_abs_diff: f64) -> bool

Returns true if the absolute difference of all elements between self and rhs is less than or equal to max_abs_diff.

This can be used to compare if two matrices contain similar elements. It works best when comparing with a known value. The max_abs_diff that should be used used depends on the values being compared against.

For more see comparing floating point numbers.

pub fn abs(&self) -> DMat2

Takes the absolute value of each element in self

pub fn as_mat2(&self) -> Mat2

Trait Implementations§

§

impl AbsDiffEq for DMat2

§

type Epsilon = <f64 as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
§

fn default_epsilon() -> <DMat2 as AbsDiffEq>::Epsilon

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

fn abs_diff_eq( &self, other: &DMat2, epsilon: <DMat2 as AbsDiffEq>::Epsilon, ) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
Source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
§

impl Add for DMat2

§

type Output = DMat2

The resulting type after applying the + operator.
§

fn add(self, rhs: DMat2) -> DMat2

Performs the + operation. Read more
§

impl Add<&DMat2> for DMat2

§

type Output = DMat2

The resulting type after applying the + operator.
§

fn add(self, rhs: &DMat2) -> DMat2

Performs the + operation. Read more
§

impl Add<&DMat2> for &DMat2

§

type Output = DMat2

The resulting type after applying the + operator.
§

fn add(self, rhs: &DMat2) -> DMat2

Performs the + operation. Read more
§

impl Add<DMat2> for &DMat2

§

type Output = DMat2

The resulting type after applying the + operator.
§

fn add(self, rhs: DMat2) -> DMat2

Performs the + operation. Read more
§

impl AddAssign for DMat2

§

fn add_assign(&mut self, rhs: DMat2)

Performs the += operation. Read more
§

impl AddAssign<&DMat2> for DMat2

§

fn add_assign(&mut self, rhs: &DMat2)

Performs the += operation. Read more
§

impl AsMut<[f64; 4]> for DMat2

§

fn as_mut(&mut self) -> &mut [f64; 4]

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

impl AsRef<[f64; 4]> for DMat2

§

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

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

impl Clone for DMat2

§

fn clone(&self) -> DMat2

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Copy for DMat2

§

impl Debug for DMat2

§

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

Formats the value using the given formatter. Read more
§

impl Default for DMat2

§

fn default() -> DMat2

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

impl<'de> Deserialize<'de> for DMat2

Deserialize expects a sequence of 4 values.

§

fn deserialize<D>( deserializer: D, ) -> Result<DMat2, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for DMat2

§

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

Formats the value using the given formatter. Read more
§

impl Div<&f64> for DMat2

§

type Output = DMat2

The resulting type after applying the / operator.
§

fn div(self, rhs: &f64) -> DMat2

Performs the / operation. Read more
§

impl Div<&f64> for &DMat2

§

type Output = DMat2

The resulting type after applying the / operator.
§

fn div(self, rhs: &f64) -> DMat2

Performs the / operation. Read more
§

impl Div<f64> for DMat2

§

type Output = DMat2

The resulting type after applying the / operator.
§

fn div(self, rhs: f64) -> DMat2

Performs the / operation. Read more
§

impl Div<f64> for &DMat2

§

type Output = DMat2

The resulting type after applying the / operator.
§

fn div(self, rhs: f64) -> DMat2

Performs the / operation. Read more
§

impl DivAssign<&f64> for DMat2

§

fn div_assign(&mut self, rhs: &f64)

Performs the /= operation. Read more
§

impl DivAssign<f64> for DMat2

§

fn div_assign(&mut self, rhs: f64)

Performs the /= operation. Read more
Source§

impl FromReflect for DMat2

Source§

fn from_reflect(reflect: &(dyn PartialReflect + 'static)) -> Option<DMat2>

Constructs a concrete instance of Self from a reflected value.
Source§

fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>

Attempts to downcast the given value to Self using, constructing the value using from_reflect if that fails. Read more
Source§

impl GetTypeRegistration for DMat2

Source§

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.
Source§

fn register_type_dependencies(registry: &mut TypeRegistry)

Registers other types needed by this type. Read more
§

impl Mul for DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: DMat2) -> DMat2

Performs the * operation. Read more
§

impl Mul<&DMat2> for DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: &DMat2) -> DMat2

Performs the * operation. Read more
§

impl Mul<&DMat2> for &DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: &DMat2) -> DMat2

Performs the * operation. Read more
§

impl Mul<&DVec2> for DMat2

§

type Output = DVec2

The resulting type after applying the * operator.
§

fn mul(self, rhs: &DVec2) -> DVec2

Performs the * operation. Read more
§

impl Mul<&DVec2> for &DMat2

§

type Output = DVec2

The resulting type after applying the * operator.
§

fn mul(self, rhs: &DVec2) -> DVec2

Performs the * operation. Read more
§

impl Mul<&f64> for DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: &f64) -> DMat2

Performs the * operation. Read more
§

impl Mul<&f64> for &DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: &f64) -> DMat2

Performs the * operation. Read more
§

impl Mul<DMat2> for &DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: DMat2) -> DMat2

Performs the * operation. Read more
§

impl Mul<DVec2> for DMat2

§

type Output = DVec2

The resulting type after applying the * operator.
§

fn mul(self, rhs: DVec2) -> <DMat2 as Mul<DVec2>>::Output

Performs the * operation. Read more
§

impl Mul<DVec2> for &DMat2

§

type Output = DVec2

The resulting type after applying the * operator.
§

fn mul(self, rhs: DVec2) -> DVec2

Performs the * operation. Read more
§

impl Mul<f64> for DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: f64) -> DMat2

Performs the * operation. Read more
§

impl Mul<f64> for &DMat2

§

type Output = DMat2

The resulting type after applying the * operator.
§

fn mul(self, rhs: f64) -> DMat2

Performs the * operation. Read more
§

impl MulAssign for DMat2

§

fn mul_assign(&mut self, rhs: DMat2)

Performs the *= operation. Read more
§

impl MulAssign<&DMat2> for DMat2

§

fn mul_assign(&mut self, rhs: &DMat2)

Performs the *= operation. Read more
§

impl MulAssign<&f64> for DMat2

§

fn mul_assign(&mut self, rhs: &f64)

Performs the *= operation. Read more
§

impl MulAssign<f64> for DMat2

§

fn mul_assign(&mut self, rhs: f64)

Performs the *= operation. Read more
§

impl Neg for DMat2

§

type Output = DMat2

The resulting type after applying the - operator.
§

fn neg(self) -> <DMat2 as Neg>::Output

Performs the unary - operation. Read more
§

impl Neg for &DMat2

§

type Output = DMat2

The resulting type after applying the - operator.
§

fn neg(self) -> DMat2

Performs the unary - operation. Read more
§

impl PartialEq for DMat2

§

fn eq(&self, rhs: &DMat2) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialReflect for DMat2

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Returns the TypeInfo of the type represented by this value. Read more
Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Tries to apply a reflected value to this value. Read more
Source§

fn reflect_kind(&self) -> ReflectKind

Returns a zero-sized enumeration of “kinds” of type. Read more
Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Returns an immutable enumeration of “kinds” of type. Read more
Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Returns a mutable enumeration of “kinds” of type. Read more
Source§

fn reflect_owned(self: Box<DMat2>) -> ReflectOwned

Returns an owned enumeration of “kinds” of type. Read more
Source§

fn try_into_reflect( self: Box<DMat2>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Attempts to cast this type to a boxed, fully-reflected value.
Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Attempts to cast this type to a fully-reflected value.
Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Attempts to cast this type to a mutable, fully-reflected value.
Source§

fn into_partial_reflect(self: Box<DMat2>) -> Box<dyn PartialReflect>

Casts this type to a boxed, reflected value. Read more
Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Casts this type to a reflected value. Read more
Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Casts this type to a mutable, reflected value. Read more
Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Returns a “partial equality” comparison result. Read more
Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Returns a “partial comparison” result. Read more
Source§

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

Debug formatter for the value. Read more
Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Attempts to clone Self using reflection. Read more
Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Applies a reflected value to this value. Read more
Source§

fn to_dynamic(&self) -> Result<Box<dyn PartialReflect>, ReflectCloneError>

Converts this reflected value into its dynamic representation based on its kind. Read more
Source§

fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
where T: 'static, Self: Sized + TypePath,

For a type implementing PartialReflect, combines reflect_clone and take in a useful fashion, automatically constructing an appropriate ReflectCloneError if the downcast fails.
Source§

fn reflect_hash(&self) -> Option<u64>

Returns a hash of the value (which includes the type). Read more
Source§

fn is_dynamic(&self) -> bool

Indicates whether or not this type is a dynamic type. Read more
§

impl Pod for DMat2

§

impl Product for DMat2

§

fn product<I>(iter: I) -> DMat2
where I: Iterator<Item = DMat2>,

Takes an iterator and generates Self from the elements by multiplying the items.
§

impl<'a> Product<&'a DMat2> for DMat2

§

fn product<I>(iter: I) -> DMat2
where I: Iterator<Item = &'a DMat2>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Reflect for DMat2

Source§

fn into_any(self: Box<DMat2>) -> Box<dyn Any>

Returns the value as a Box<dyn Any>. Read more
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns the value as a &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Returns the value as a &mut dyn Any. Read more
Source§

fn into_reflect(self: Box<DMat2>) -> Box<dyn Reflect>

Casts this type to a boxed, fully-reflected value.
Source§

fn as_reflect(&self) -> &(dyn Reflect + 'static)

Casts this type to a fully-reflected value.
Source§

fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)

Casts this type to a mutable, fully-reflected value.
Source§

fn set(&mut self, value: Box<dyn Reflect>) -> Result<(), Box<dyn Reflect>>

Performs a type-checked assignment of a reflected value to this value. Read more
§

impl RelativeEq for DMat2

§

fn default_max_relative() -> <DMat2 as AbsDiffEq>::Epsilon

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

fn relative_eq( &self, other: &DMat2, epsilon: <DMat2 as AbsDiffEq>::Epsilon, max_relative: <DMat2 as AbsDiffEq>::Epsilon, ) -> bool

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

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

The inverse of RelativeEq::relative_eq.
§

impl Serialize for DMat2

Serialize as a sequence of 4 values.

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Struct for DMat2

Source§

fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>

Gets a reference to the value of the field named name as a &dyn PartialReflect.
Source§

fn field_mut( &mut self, name: &str, ) -> Option<&mut (dyn PartialReflect + 'static)>

Gets a mutable reference to the value of the field named name as a &mut dyn PartialReflect.
Source§

fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>

Gets a reference to the value of the field with index index as a &dyn PartialReflect.
Source§

fn field_at_mut( &mut self, index: usize, ) -> Option<&mut (dyn PartialReflect + 'static)>

Gets a mutable reference to the value of the field with index index as a &mut dyn PartialReflect.
Source§

fn name_at(&self, index: usize) -> Option<&str>

Gets the name of the field with index index.
Source§

fn index_of_name(&self, name: &str) -> Option<usize>

Gets the index of the field with the given name.
Source§

fn field_len(&self) -> usize

Returns the number of fields in the struct.
Source§

fn iter_fields(&self) -> FieldIter<'_> ⓘ

Returns an iterator over the values of the reflectable fields for this struct.
Source§

fn to_dynamic_struct(&self) -> Result<DynamicStruct, ReflectCloneError>

Creates a new DynamicStruct from this struct. Read more
Source§

fn get_represented_struct_info(&self) -> Option<&'static StructInfo>

Will return None if TypeInfo is not available.
§

impl Sub for DMat2

§

type Output = DMat2

The resulting type after applying the - operator.
§

fn sub(self, rhs: DMat2) -> DMat2

Performs the - operation. Read more
§

impl Sub<&DMat2> for DMat2

§

type Output = DMat2

The resulting type after applying the - operator.
§

fn sub(self, rhs: &DMat2) -> DMat2

Performs the - operation. Read more
§

impl Sub<&DMat2> for &DMat2

§

type Output = DMat2

The resulting type after applying the - operator.
§

fn sub(self, rhs: &DMat2) -> DMat2

Performs the - operation. Read more
§

impl Sub<DMat2> for &DMat2

§

type Output = DMat2

The resulting type after applying the - operator.
§

fn sub(self, rhs: DMat2) -> DMat2

Performs the - operation. Read more
§

impl SubAssign for DMat2

§

fn sub_assign(&mut self, rhs: DMat2)

Performs the -= operation. Read more
§

impl SubAssign<&DMat2> for DMat2

§

fn sub_assign(&mut self, rhs: &DMat2)

Performs the -= operation. Read more
§

impl Sum for DMat2

§

fn sum<I>(iter: I) -> DMat2
where I: Iterator<Item = DMat2>,

Takes an iterator and generates Self from the elements by “summing up” the items.
§

impl<'a> Sum<&'a DMat2> for DMat2

§

fn sum<I>(iter: I) -> DMat2
where I: Iterator<Item = &'a DMat2>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TypePath for DMat2

Source§

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
Source§

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
Source§

fn type_ident() -> Option<&'static str>

Returns the name of the type, or None if it is anonymous. Read more
Source§

fn crate_name() -> Option<&'static str>

Returns the name of the crate the type is in, or None if it is anonymous. Read more
Source§

fn module_path() -> Option<&'static str>

Returns the path to the module the type is in, or None if it is anonymous. Read more
Source§

impl Typed for DMat2

Source§

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.
§

impl UlpsEq for DMat2

§

fn default_max_ulps() -> u32

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

fn ulps_eq( &self, other: &DMat2, epsilon: <DMat2 as AbsDiffEq>::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 ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
§

impl Zeroable for DMat2

Source§

fn zeroed() -> Self

Auto Trait Implementations§

§

impl Freeze for DMat2

§

impl RefUnwindSafe for DMat2

§

impl Send for DMat2

§

impl Sync for DMat2

§

impl Unpin for DMat2

§

impl UnsafeUnpin for DMat2

§

impl UnwindSafe for DMat2

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> AnyBitPattern for T
where T: Pod,

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> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynamicTypePath for T
where T: TypePath,

Source§

impl<T> DynamicTyped for T
where T: Typed,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> GetField for S
where S: Struct,

Source§

fn get_field<T>(&self, name: &str) -> Option<&T>
where T: Reflect,

Gets a reference to the value of the field named name, downcast to T.
Source§

fn get_field_mut<T>(&mut self, name: &str) -> Option<&mut T>
where T: Reflect,

Gets a mutable reference to the value of the field named name, downcast to T.
Source§

impl<T> GetPath for T
where T: Reflect + ?Sized,

Source§

fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a reference to the value specified by path. Read more
Source§

fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a mutable reference to the value specified by path. Read more
Source§

fn path<'p, T>( &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed reference to the value specified by path. Read more
Source§

fn path_mut<'p, T>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed mutable reference to the value specified by path. Read more
§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

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

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
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<A> Is for A
where A: Any,

Source§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T> Reflectable for T

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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> ToSmolStr for T
where T: Display + ?Sized,

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

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

Source§

fn clone_type_data(&self) -> Box<dyn TypeData>

Creates a type-erased clone of self.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,