Matrix2
class Matrix2
Represents a 2x2 matrix.
set takes its arguments in row-major order, so a call reads the way you write the matrix on paper. elements stores them in column-major order: Matrix2().set(11.0, 12.0, 21.0, 22.0) stores [11, 21, 12, 22]. There is no constructor that takes the elements.
Matrices are mutable and not thread-safe. Use each instance from one thread only.