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

source

pub fn from_scale<S>(scale: S) -> Matrix2x2F
where S: IntoVector2F,

source

pub fn from_rotation(theta: f32) -> Matrix2x2F

source

pub fn from_rotation_vector(vector: UnitVector) -> Matrix2x2F

source

pub fn row_major(m00: f32, m01: f32, m10: f32, m11: f32) -> Matrix2x2F

source

pub fn entrywise_mul(&self, other: &Matrix2x2F) -> Matrix2x2F

source

pub fn adjugate(&self) -> Matrix2x2F

source

pub fn det(&self) -> f32

source

pub fn inverse(&self) -> Matrix2x2F

source

pub fn scale(&self, factor: f32) -> Matrix2x2F

source

pub fn extract_scale(&self) -> Vector2F

Extracts the scale from this matrix.

source

pub fn m11(&self) -> f32

source

pub fn m21(&self) -> f32

source

pub fn m12(&self) -> f32

source

pub fn m22(&self) -> f32

Trait Implementations§

source§

impl Add for Matrix2x2F

§

type Output = Matrix2x2F

The resulting type after applying the + operator.
source§

fn add(self, other: Matrix2x2F) -> Matrix2x2F

Performs the + operation. Read more
source§

impl Clone for Matrix2x2F

source§

fn clone(&self) -> Matrix2x2F

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Matrix2x2F

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for Matrix2x2F

source§

fn default() -> Matrix2x2F

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

impl Mul<Vector2F> for Matrix2x2F

§

type Output = Vector2F

The resulting type after applying the * operator.
source§

fn mul(self, vector: Vector2F) -> Vector2F

Performs the * operation. Read more
source§

impl Mul for Matrix2x2F

§

type Output = Matrix2x2F

The resulting type after applying the * operator.
source§

fn mul(self, other: Matrix2x2F) -> Matrix2x2F

Performs the * operation. Read more
source§

impl Neg for Matrix2x2F

§

type Output = Matrix2x2F

The resulting type after applying the - operator.
source§

fn neg(self) -> Matrix2x2F

Performs the unary - operation. Read more
source§

impl PartialEq for Matrix2x2F

source§

fn eq(&self, other: &Matrix2x2F) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub for Matrix2x2F

§

type Output = Matrix2x2F

The resulting type after applying the - operator.
source§

fn sub(self, other: Matrix2x2F) -> Matrix2x2F

Performs the - operation. Read more
source§

impl Copy for Matrix2x2F

source§

impl StructuralPartialEq for Matrix2x2F

Auto Trait Implementations§

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> 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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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<T> ToOwned for T
where T: Clone,

§

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.