Type Alias piston_window::math::Matrix2d

source ·
pub type Matrix2d<T = f64> = [[T; 3]; 2];
Expand description

The type used for matrices.

Trait Implementations§

source§

impl Transformed for [[f64; 3]; 2]

source§

fn append_transform(self, transform: [[f64; 3]; 2]) -> [[f64; 3]; 2]

Appends transform to the current one.
source§

fn prepend_transform(self, transform: [[f64; 3]; 2]) -> [[f64; 3]; 2]

Prepends transform to the current one.
source§

fn trans(self, x: f64, y: f64) -> [[f64; 3]; 2]

Translate x and y in local coordinates.
source§

fn rot_rad(self, angle: f64) -> [[f64; 3]; 2]

Rotate radians in local coordinates.
source§

fn orient(self, x: f64, y: f64) -> [[f64; 3]; 2]

Orients x axis to look at point locally. Read more
source§

fn scale(self, sx: f64, sy: f64) -> [[f64; 3]; 2]

Scales in local coordinates.
source§

fn shear(self, x: f64, y: f64) -> [[f64; 3]; 2]

Shears in local coordinates.
source§

fn rot_deg(self, angle: f64) -> Self

Rotates degrees in local coordinates.
source§

fn trans_pos<P>(self, pos: P) -> Selfwhere P: Into<[f64; 2]>,

Translate position in local coordinates.
source§

fn orient_pos<P>(self, pos: P) -> Selfwhere P: Into<[f64; 2]>,

Orients x axis to look at point locally.
source§

fn scale_pos<P>(self, pos: P) -> Selfwhere P: Into<[f64; 2]>,

Scales in local coordinates.
source§

fn zoom(self, s: f64) -> Self

Scales in both directions in local coordinates.
source§

fn flip_v(self) -> Self

Flips vertically in local coordinates.
source§

fn flip_h(self) -> Self

Flips horizontally in local coordinates.
source§

fn flip_hv(self) -> Self

Flips horizontally and vertically in local coordinates.
source§

fn shear_pos<P>(self, pos: P) -> Selfwhere P: Into<[f64; 2]>,

Shears in local coordinates.