pub struct Transformation2D {
    a: f64,
    b: f64,
    c: f64,
    d: f64,
}
Expand description

General Information

Represents a matrix transformation in 2D. A normal matrix composed of vectors or arrays is not used since more control over the traits that are implemented on the struct makes latter implementations easier.

Fields

  • a - Element [0,0] in matrix
  • b - Element [0,1] in matrix
  • c - Element [1,0] in matrix
  • d - Element [1,1] in matrix

Fields§

§a: f64§b: f64§c: f64§d: f64

Implementations§

New instance

Inverse of a 2x2 matrix

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.