#[repr(C)]pub struct Matrix3x2 {
pub m11: f32,
pub m12: f32,
pub m21: f32,
pub m22: f32,
pub m31: f32,
pub m32: f32,
}Fields§
§m11: f32§m12: f32§m21: f32§m22: f32§m31: f32§m32: f32Implementations§
Source§impl Matrix3x2
impl Matrix3x2
Sourcepub const fn translation(x: f32, y: f32) -> Self
pub const fn translation(x: f32, y: f32) -> Self
Returns a matrix that translates by (x, y).
Sourcepub fn rotation(angle: f32) -> Self
pub fn rotation(angle: f32) -> Self
Returns a matrix that rotates by angle degrees about the origin.
Sourcepub fn rotation_around(angle: f32, center: Vector2) -> Self
pub fn rotation_around(angle: f32, center: Vector2) -> Self
Returns a matrix that rotates by angle degrees about center.
Sourcepub fn scale(scale_x: f32, scale_y: f32) -> Self
pub fn scale(scale_x: f32, scale_y: f32) -> Self
Returns a matrix that scales by scale_x and scale_y about the origin.
Sourcepub fn scale_around(scale_x: f32, scale_y: f32, center: Vector2) -> Self
pub fn scale_around(scale_x: f32, scale_y: f32, center: Vector2) -> Self
Returns a matrix that scales by scale_x and scale_y about center.
Sourcepub fn skew(angle_x: f32, angle_y: f32) -> Self
pub fn skew(angle_x: f32, angle_y: f32) -> Self
Returns a matrix that skews by angle_x and angle_y degrees about
the origin.
Sourcepub fn skew_around(angle_x: f32, angle_y: f32, center: Vector2) -> Self
pub fn skew_around(angle_x: f32, angle_y: f32, center: Vector2) -> Self
Returns a matrix that skews by angle_x and angle_y degrees about
center.
Trait Implementations§
impl Copy for Matrix3x2
impl StructuralPartialEq for Matrix3x2
Auto Trait Implementations§
impl Freeze for Matrix3x2
impl RefUnwindSafe for Matrix3x2
impl Send for Matrix3x2
impl Sync for Matrix3x2
impl Unpin for Matrix3x2
impl UnsafeUnpin for Matrix3x2
impl UnwindSafe for Matrix3x2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more