Struct Mat2x3
Row-major 2x3 floating point matrix, used for 2D affine transformations. Zero by default.
Multiplication and inversion are performed as 3x3 with implicit (0,0,1) last row.
Fields
Type | Name | Description |
float[3][2]
|
store
|
|
Methods
Name | Description |
invert
()
|
Invert this transform. If matrix is not invertible, resets it to identity matrix
|
inverted
()
|
Returns inverted matrix. If matrix is not invertible, returns identity matrix
|
opBinary
(mat)
|
Add or subtract a matrix
|
opBinary
(mat)
|
Multiply this matrix by another one, as they were 3x3 with (0,0,1) last row
|
opBinary
(vec)
|
Transform a vector by this matrix
|
opEquals
(m)
|
|
opOpAssign
(mat)
|
Add or subtract a matrix
|
opOpAssign
(mat)
|
Multiply this matrix by another one, as they were 3x3 with (0,0,1) last row
|
ptr
()
|
Returns the pointer to the stored values array.
|
rotate
(radians)
|
Apply rotation to this matrix
|
scale
(factor)
|
Apply scaling to this matrix
|
skew
(factor)
|
Apply skewing to this matrix
|
toString
()
|
|
translate
(offset)
|
Apply translation to this matrix
|
Static methods
Name | Description |
rotation
(radians)
|
Make a rotation matrix
|
scaling
(factor)
|
Make a scaling matrix
|
skewing
(factor)
|
Make a skewing matrix
|
translation
(offset)
|
Make a translation matrix
|