pub struct Affine2 {
pub m11: f32,
pub m12: f32,
pub m21: f32,
pub m22: f32,
pub tx: f32,
pub ty: f32,
}Expand description
Data type for affine2.
Fields§
§m11: f32The m11 value.
m12: f32The m12 value.
m21: f32The m21 value.
m22: f32The m22 value.
tx: f32The tx value.
ty: f32The ty value.
Implementations§
Source§impl Affine2
impl Affine2
Sourcepub const fn translation(tx: f32, ty: f32) -> Self
pub const fn translation(tx: f32, ty: f32) -> Self
Creates a new value.
Sourcepub fn determinant(self) -> Result<f32>
pub fn determinant(self) -> Result<f32>
Returns determinant.
Sourcepub fn apply_point(self, point: Point2f) -> Point2f
pub fn apply_point(self, point: Point2f) -> Point2f
Returns apply point.
Trait Implementations§
impl Copy for Affine2
Source§impl<'de> Deserialize<'de> for Affine2
impl<'de> Deserialize<'de> for Affine2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Affine2
Auto Trait Implementations§
impl Freeze for Affine2
impl RefUnwindSafe for Affine2
impl Send for Affine2
impl Sync for Affine2
impl Unpin for Affine2
impl UnsafeUnpin for Affine2
impl UnwindSafe for Affine2
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