Matrix2
class Matrix2
Represents a 2x2 matrix.
A note on row-major and column-major ordering: the constructor and set take arguments in row-major order, while internally they are stored in the elements array in column-major order. This means that
val m = Matrix2()
m.set(11.0, 12.0,
21.0, 22.0)Content copied to clipboard
results in the elements array containing [ 11, 21, 12, 22 ], and internally all calculations are performed using column-major ordering.
Matrices are mutable and not thread-safe; confine an instance (and any object graph holding it) to a single thread, exactly as in three.js.