- class M33d
3x3 double precision floating point transformation matrix.
- M33d()
Default constructor: initialize to identity
1 0 00 1 00 0 1
- M33d(a: double)
Initialize to scalar constant
a a aa a aa a a
- M33d(a: double, b: double, c: double, d: double, e: double, f: double, g: double, h: double, i: double)
Construct from given scalar values:
a b cd e fg h i
- determinant() double
Determinant
- equalWithAbsError(m: M33d, e: double) 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: M33d, e: double) 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) double
Build a minor using the specified rows and columns
- gjInverse() M33d
Return the inverse using the Gauss-Jordan method. Significantly slower, leaving this unmodified. Slower but more accurate than inverse().
- gjInvert()
Invert in place using the Gauss-Jordan method. Significantly slower but more accurate than invert().
- invert()
Invert in place using the determinant
- negate()
Component-wise multiplication by -1
- makeIdentity()
Set to the identity matrix
- minorOf(r: int, c: int) double
Calculate the matrix minor of the (r,c) element
- rotate(r: double)
Rotate the given matrix by r (in radians)
- shear(h: V2d)
Shear the matrix in x for each y coord. by given factor xy and shear y for each x coord. by given factor yx
- shear(xy: double)
Shear the matrix in x for each y coord. by given factor xy
- setScale(s: double)
Set matrix to scale by given uniform factor
- setShear(h: V2d)
Set matrix to shear x for each y coord. by given factor h.x and to shear y for each x coord. by given factor h.y
- transpose()
Transpose