- class M22f
2x2 floating point transformation matrix.
- M22f()
Default constructor: initialize to identity
1 00 1
- M22f(a: float)
Initialize to scalar constant
a aa a
- M22f(a: float, b: float, c: float, d: float)
Construct from given scalar values:
a bc d
- determinant() float
Determinant
- equalWithAbsError(m: M22f, e: float) bool
Compare two matrices and test if they are “approximately equal”: @return True if the coefficients of this and m are the same with an absolute error of no more than e, i.e., for all i, j:
abs (this[i][j] - m[i][j]) <= e
- equalWithRelError(m: M22f, e: float) bool
Compare two matrices and test if they are “approximately equal”: @return True if the coefficients of this and m are the same with a relative error of no more than e, i.e., for all i, j:
abs (this[i] - v[i][j]) <= e * abs (this[i][j])
- fastMinor(r0: int, r1: int, c0: int, c1: int) float
Build a minor using the specified rows and columns
- invert()
Invert in place using the determinant
- negate()
Component-wise multiplication by -1
- makeIdentity()
Set to the identity matrix
- rotate(r: float)
Rotate the matrix by r (in radians)
- setRotation(r: float)
Set matrix to rotation by r (in radians)
- setScale(s: float)
Set matrix to scale by given uniform factor
- transpose()
Transpose