Struct ochre::Mat2x2[][src]

pub struct Mat2x2(pub [f32; 4]);

A 2×2 matrix, in row-major order.

Implementations

impl Mat2x2[src]

pub fn new(a: f32, b: f32, c: f32, d: f32) -> Mat2x2[src]

Constructs a 2×2 matrix. Arguments are given in row-major order.

pub fn id() -> Mat2x2[src]

Constructs an identity matrix.

pub fn scale(scale: f32) -> Mat2x2[src]

Constructs a uniform scaling matrix.

pub fn rotate(angle: f32) -> Mat2x2[src]

Constructs a rotation matrix.

Trait Implementations

impl Clone for Mat2x2[src]

impl Copy for Mat2x2[src]

impl Debug for Mat2x2[src]

impl Mul<Mat2x2> for Mat2x2[src]

type Output = Mat2x2

The resulting type after applying the * operator.

impl Mul<Vec2> for Mat2x2[src]

type Output = Vec2

The resulting type after applying the * operator.

impl Mul<f32> for Mat2x2[src]

type Output = Mat2x2

The resulting type after applying the * operator.

impl PartialEq<Mat2x2> for Mat2x2[src]

impl StructuralPartialEq for Mat2x2[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.