#[repr(C)]pub struct Mat3<T: Float = f32> {
pub m: [[T; 3]; 3],
}Expand description
A packed 3×3 row-major matrix.
Fields§
§m: [[T; 3]; 3]Implementations§
Source§impl<T: Float> Mat3<T>
impl<T: Float> Mat3<T>
pub fn is_identity(self, tolerance: T) -> bool
pub fn is_orthonormal(self, tolerance: T) -> bool
pub fn is_proper_rotation(self, tolerance: T) -> bool
pub fn try_orthonormal_basis( first: Vec3<T>, second: Vec3<T>, tolerance: T, ) -> Option<Self>
pub fn try_transform_normal( self, normal: Vec3<T>, tolerance: T, ) -> Option<Vec3<T>>
Source§impl<T: Float> Mat3<T>
impl<T: Float> Mat3<T>
pub fn identity() -> Self
pub fn is_finite(self) -> bool
pub fn transpose(self) -> Self
pub fn determinant(self) -> T
pub fn try_inverse(self, tolerance: T) -> Option<Self>
pub fn transform(self, value: Vec3<T>) -> Vec3<T>
pub fn approximately_equal(self, other: Self, absolute: T, relative: T) -> bool
Trait Implementations§
Source§impl<T: Float> AddAssign for Mat3<T>
impl<T: Float> AddAssign for Mat3<T>
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreimpl<T: Copy + Float> Copy for Mat3<T>
Source§impl<T: Float> DivAssign<T> for Mat3<T>
impl<T: Float> DivAssign<T> for Mat3<T>
Source§fn div_assign(&mut self, scalar: T)
fn div_assign(&mut self, scalar: T)
Performs the
/= operation. Read moreSource§impl<T: Float> MulAssign for Mat3<T>
impl<T: Float> MulAssign for Mat3<T>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl<T: Float> MulAssign<T> for Mat3<T>
impl<T: Float> MulAssign<T> for Mat3<T>
Source§fn mul_assign(&mut self, scalar: T)
fn mul_assign(&mut self, scalar: T)
Performs the
*= operation. Read moreimpl<T: PartialEq + Float> StructuralPartialEq for Mat3<T>
Auto Trait Implementations§
impl<T> Forget for Mat3<T>
impl<T> Freeze for Mat3<T>where
T: Freeze,
impl<T> Move for Mat3<T>
impl<T> RefUnwindSafe for Mat3<T>where
T: RefUnwindSafe,
impl<T> Send for Mat3<T>where
T: Send,
impl<T> Sync for Mat3<T>where
T: Sync,
impl<T> Unpin for Mat3<T>where
T: Unpin,
impl<T> UnsafeUnpin for Mat3<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Mat3<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more