pub struct Matrix {
pub a: f64,
pub b: f64,
pub c: f64,
pub d: f64,
pub e: f64,
pub f: f64,
}Expand description
An affine transformation.
Fields§
§a: f64Row 1, column 1.
b: f64Row 1, column 2.
c: f64Row 2, column 1.
d: f64Row 2, column 2.
e: f64Translation x.
f: f64Translation y.
Implementations§
Source§impl Matrix
impl Matrix
Sourcepub const fn new(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64) -> Matrix
pub const fn new(a: f64, b: f64, c: f64, d: f64, e: f64, f: f64) -> Matrix
A matrix from its six numbers.
Sourcepub fn from_slice(v: &[f64]) -> Option<Matrix>
pub fn from_slice(v: &[f64]) -> Option<Matrix>
From six operands, if they are all finite numbers.
Trait Implementations§
impl Copy for Matrix
impl StructuralPartialEq for Matrix
Auto Trait Implementations§
impl Freeze for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnsafeUnpin for Matrix
impl UnwindSafe for Matrix
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