Struct pathfinder_geometry::transform2d::Matrix2x2F
source · pub struct Matrix2x2F(pub F32x4);
Expand description
A 2x2 matrix, optimized with SIMD, in column-major order.
Tuple Fields§
§0: F32x4
Implementations§
source§impl Matrix2x2F
impl Matrix2x2F
pub fn from_scale<S>(scale: S) -> Matrix2x2Fwhere
S: IntoVector2F,
pub fn from_rotation(theta: f32) -> Matrix2x2F
pub fn from_rotation_vector(vector: UnitVector) -> Matrix2x2F
pub fn row_major(m00: f32, m01: f32, m10: f32, m11: f32) -> Matrix2x2F
pub fn entrywise_mul(&self, other: &Matrix2x2F) -> Matrix2x2F
pub fn adjugate(&self) -> Matrix2x2F
pub fn det(&self) -> f32
pub fn inverse(&self) -> Matrix2x2F
pub fn scale(&self, factor: f32) -> Matrix2x2F
sourcepub fn extract_scale(&self) -> Vector2F
pub fn extract_scale(&self) -> Vector2F
Extracts the scale from this matrix.
pub fn m11(&self) -> f32
pub fn m21(&self) -> f32
pub fn m12(&self) -> f32
pub fn m22(&self) -> f32
Trait Implementations§
source§impl Add for Matrix2x2F
impl Add for Matrix2x2F
§type Output = Matrix2x2F
type Output = Matrix2x2F
The resulting type after applying the
+
operator.source§fn add(self, other: Matrix2x2F) -> Matrix2x2F
fn add(self, other: Matrix2x2F) -> Matrix2x2F
Performs the
+
operation. Read moresource§impl Clone for Matrix2x2F
impl Clone for Matrix2x2F
source§fn clone(&self) -> Matrix2x2F
fn clone(&self) -> Matrix2x2F
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Matrix2x2F
impl Debug for Matrix2x2F
source§impl Default for Matrix2x2F
impl Default for Matrix2x2F
source§fn default() -> Matrix2x2F
fn default() -> Matrix2x2F
Returns the “default value” for a type. Read more
source§impl Mul<Vector2F> for Matrix2x2F
impl Mul<Vector2F> for Matrix2x2F
source§impl Mul for Matrix2x2F
impl Mul for Matrix2x2F
§type Output = Matrix2x2F
type Output = Matrix2x2F
The resulting type after applying the
*
operator.source§fn mul(self, other: Matrix2x2F) -> Matrix2x2F
fn mul(self, other: Matrix2x2F) -> Matrix2x2F
Performs the
*
operation. Read moresource§impl Neg for Matrix2x2F
impl Neg for Matrix2x2F
§type Output = Matrix2x2F
type Output = Matrix2x2F
The resulting type after applying the
-
operator.source§fn neg(self) -> Matrix2x2F
fn neg(self) -> Matrix2x2F
Performs the unary
-
operation. Read moresource§impl PartialEq for Matrix2x2F
impl PartialEq for Matrix2x2F
source§fn eq(&self, other: &Matrix2x2F) -> bool
fn eq(&self, other: &Matrix2x2F) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sub for Matrix2x2F
impl Sub for Matrix2x2F
§type Output = Matrix2x2F
type Output = Matrix2x2F
The resulting type after applying the
-
operator.source§fn sub(self, other: Matrix2x2F) -> Matrix2x2F
fn sub(self, other: Matrix2x2F) -> Matrix2x2F
Performs the
-
operation. Read moreimpl Copy for Matrix2x2F
impl StructuralPartialEq for Matrix2x2F
Auto Trait Implementations§
impl Freeze for Matrix2x2F
impl RefUnwindSafe for Matrix2x2F
impl Send for Matrix2x2F
impl Sync for Matrix2x2F
impl Unpin for Matrix2x2F
impl UnwindSafe for Matrix2x2F
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