#[non_exhaustive]pub struct Mat3 {
pub m: [[f64; 3]; 3],
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.m: [[f64; 3]; 3]Row-major: m[row][col]
Implementations§
Source§impl Mat3
impl Mat3
pub const IDENTITY: Self
pub const ZERO: Self
pub const fn new(m: [[f64; 3]; 3]) -> Self
pub fn from_cols(c0: Vec3, c1: Vec3, c2: Vec3) -> Self
Sourcepub fn transform_point(&self, v: Vec2) -> Vec2
pub fn transform_point(&self, v: Vec2) -> Vec2
Matrix × vector (homogeneous 2D: Vec2 → Vec2 via w=1)
Sourcepub fn transform_dir(&self, v: Vec2) -> Vec2
pub fn transform_dir(&self, v: Vec2) -> Vec2
Transform direction (ignores translation)
pub fn transpose(&self) -> Self
pub fn determinant(&self) -> f64
Trait Implementations§
impl Copy for Mat3
impl StructuralPartialEq for Mat3
Auto Trait Implementations§
impl Freeze for Mat3
impl RefUnwindSafe for Mat3
impl Send for Mat3
impl Sync for Mat3
impl Unpin for Mat3
impl UnsafeUnpin for Mat3
impl UnwindSafe for Mat3
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