Struct ochre::Mat2x2 [−][src]
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.
fn mul(self, rhs: Mat2x2) -> Mat2x2
[src]
impl Mul<Vec2> for Mat2x2
[src]
type Output = Vec2
The resulting type after applying the *
operator.
fn mul(self, rhs: Vec2) -> Vec2
[src]
impl Mul<f32> for Mat2x2
[src]
type Output = Mat2x2
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Mat2x2
[src]
impl PartialEq<Mat2x2> for Mat2x2
[src]
impl StructuralPartialEq for Mat2x2
[src]
Auto Trait Implementations
impl RefUnwindSafe for Mat2x2
[src]
impl Send for Mat2x2
[src]
impl Sync for Mat2x2
[src]
impl Unpin for Mat2x2
[src]
impl UnwindSafe for Mat2x2
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,