[−][src]Struct rask_engine::math::Mat2
A 2x2 matrix with f32
elements.
Implementations
impl Mat2
[src]
pub const fn new(a: f32, b: f32, c: f32, d: f32) -> Self
[src]
Creates a new Mat2
of the form:
(a b)
(c d)
pub const fn from_vec2(v1: Vec2, v2: Vec2) -> Self
[src]
Creates a new Mat2
from two column Vec2
s.
pub const fn zero() -> Self
[src]
Returns the zero matrix.
pub const fn identity() -> Self
[src]
Returns the identity matrix.
pub fn rotation(angle: f32) -> Self
[src]
Returns a matrix that rotates by angle
.
pub const fn scaling(scale_x: f32, scale_y: f32) -> Self
[src]
Returns a matrix that scales by scale_x
and scale_y
.
pub const fn transpose(self) -> Self
[src]
Returns the transposed matrix.
Trait Implementations
impl Add<Mat2> for Mat2
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self::Output
[src]
impl AddAssign<Mat2> for Mat2
[src]
fn add_assign(&mut self, other: Self)
[src]
impl AsRef<[f32; 4]> for Mat2
[src]
impl Clone for Mat2
[src]
impl Copy for Mat2
[src]
impl Debug for Mat2
[src]
impl Default for Mat2
[src]
impl Div<f32> for Mat2
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, scale: f32) -> Self::Output
[src]
impl DivAssign<f32> for Mat2
[src]
fn div_assign(&mut self, scale: f32)
[src]
impl Eq for Mat2
[src]
impl Mul<Mat2> for f32
[src]
type Output = Mat2
The resulting type after applying the *
operator.
fn mul(self, rhs: Mat2) -> Self::Output
[src]
impl Mul<Mat2> for Mat2
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self::Output
[src]
impl Mul<Vec2> for Mat2
[src]
type Output = Vec2
The resulting type after applying the *
operator.
fn mul(self, other: Vec2) -> Self::Output
[src]
impl Mul<f32> for Mat2
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, scale: f32) -> Self::Output
[src]
impl MulAssign<Mat2> for Mat2
[src]
fn mul_assign(&mut self, other: Self)
[src]
impl MulAssign<f32> for Mat2
[src]
fn mul_assign(&mut self, scale: f32)
[src]
impl Neg for Mat2
[src]
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl PartialEq<Mat2> for Mat2
[src]
impl Sub<Mat2> for Mat2
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self::Output
[src]
impl SubAssign<Mat2> for Mat2
[src]
fn sub_assign(&mut self, other: Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Mat2
impl Send for Mat2
impl Sync for Mat2
impl Unpin for Mat2
impl UnwindSafe for Mat2
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S, T> Collide<[T]> for S where
T: Collide<S>,
[src]
T: Collide<S>,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
const ALIGN: usize
type Init = T
The type for initializers.
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
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.
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>,