[−][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][+]
impl AddAssign<Mat2> for Mat2
[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][+]
impl DivAssign<f32> for Mat2
[src][+]
impl Eq for Mat2
[src]
impl Mul<Mat2> for f32
[src][+]
impl Mul<Mat2> for Mat2
[src][+]
impl Mul<Vec2> for Mat2
[src][+]
impl Mul<f32> for Mat2
[src][+]
impl MulAssign<Mat2> for Mat2
[src][+]
impl MulAssign<f32> for Mat2
[src][+]
impl Neg for Mat2
[src][+]
impl PartialEq<Mat2> for Mat2
[src][+]
impl Sub<Mat2> for Mat2
[src][+]
impl SubAssign<Mat2> for Mat2
[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,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
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
[+]
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,
impl<T> TryDefault for T where
T: Default,
[+]
T: Default,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,