Struct Mat2f

Source
pub struct Mat2f { /* private fields */ }

Implementations§

Source§

impl Mat2f

Source

pub fn new(x_axis: Vec2f, y_axis: Vec2f) -> Self

Source

pub fn zero() -> Self

Source

pub fn identity() -> Self

Source§

impl Mat2f

Source

pub fn col(&self, index: usize) -> Vec2f

Source

pub fn row(&self, index: usize) -> Vec2f

Source

pub fn is_nan(&self) -> bool

Source

pub fn is_infinite(&self) -> bool

Source

pub fn is_finite(&self) -> bool

Source

pub fn transpose(&self) -> Self

Source

pub fn determinant(&self) -> f32

Source

pub fn inverse(&self) -> Self

Source

pub fn try_inverse(&self) -> Option<Self>

Source§

impl Mat2f

Source

pub fn from_array(m: [f32; 4]) -> Self

Source

pub fn from_array_2d(m: [[f32; 2]; 2]) -> Self

Source

pub fn from_diagonal(diagonal: Vec2f) -> Self

Source§

impl Mat2f

Source

pub fn to_array(self) -> [f32; 4]

Source

pub fn to_array_2d(self) -> [[f32; 2]; 2]

Source

pub fn to_mat3f(self) -> Mat3f

Source

pub fn to_mat4f(self) -> Mat4f

Source

pub fn to_mat2d(self) -> Mat2d

Trait Implementations§

Source§

impl Add<Mat2f> for f32

Source§

type Output = Mat2f

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Mat2f) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<f32> for Mat2f

Source§

type Output = Mat2f

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f32) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for Mat2f

Source§

type Output = Mat2f

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Mat2f) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<f32> for Mat2f

Source§

fn add_assign(&mut self, rhs: f32)

Performs the += operation. Read more
Source§

impl AddAssign for Mat2f

Source§

fn add_assign(&mut self, rhs: Mat2f)

Performs the += operation. Read more
Source§

impl Clone for Mat2f

Source§

fn clone(&self) -> Mat2f

Returns a duplicate 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 Mat2f

Source§

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

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

impl Default for Mat2f

Source§

fn default() -> Self

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

impl Display for Mat2f

Source§

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

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

impl Div<f32> for Mat2f

Source§

type Output = Mat2f

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<f32> for Mat2f

Source§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
Source§

impl From<Mat2f> for Mat3f

Source§

fn from(m: Mat2f) -> Self

Converts to this type from the input type.
Source§

impl From<Mat2f> for Mat4f

Source§

fn from(m: Mat2f) -> Self

Converts to this type from the input type.
Source§

impl From<Mat3f> for Mat2f

Source§

fn from(m: Mat3f) -> Self

Converts to this type from the input type.
Source§

impl From<Mat4f> for Mat2f

Source§

fn from(m: Mat4f) -> Self

Converts to this type from the input type.
Source§

impl Index<usize> for Mat2f

Source§

type Output = Vec2f

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Mat2f

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Mul<Mat2f> for f32

Source§

type Output = Mat2f

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Mat2f) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Vec2f> for Mat2f

Source§

type Output = Vec2f

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vec2f) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for Mat2f

Source§

type Output = Mat2f

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for Mat2f

Source§

type Output = Mat2f

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Mat2f) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<f32> for Mat2f

Source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Source§

impl MulAssign for Mat2f

Source§

fn mul_assign(&mut self, rhs: Mat2f)

Performs the *= operation. Read more
Source§

impl PartialEq for Mat2f

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Sub<Mat2f> for f32

Source§

type Output = Mat2f

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Mat2f) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<f32> for Mat2f

Source§

type Output = Mat2f

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f32) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for Mat2f

Source§

type Output = Mat2f

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Mat2f) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign<f32> for Mat2f

Source§

fn sub_assign(&mut self, rhs: f32)

Performs the -= operation. Read more
Source§

impl SubAssign for Mat2f

Source§

fn sub_assign(&mut self, rhs: Mat2f)

Performs the -= operation. Read more
Source§

impl Copy for Mat2f

Source§

impl StructuralPartialEq for Mat2f

Auto Trait Implementations§

§

impl Freeze for Mat2f

§

impl RefUnwindSafe for Mat2f

§

impl Send for Mat2f

§

impl Sync for Mat2f

§

impl Unpin for Mat2f

§

impl UnwindSafe for Mat2f

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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.