Math module

determinant

procedure · 1 overloadSource

The determinant of a Matrix4, by cofactor expansion along the first row, as a float. Zero means the matrix is not invertible; the sign tells whether it flips handedness.

ExampleOpen in playground ↗
assert(determinant(Matrix4_Identity) == 1);
assert(determinant(make_scale_matrix4(xyz(2, 3, 4))) == 24);
assert(determinant(make_scale_matrix4(xyz(-1, 1, 1))) == -1);
determinant :: (m: Matrix4) -> float

The determinant.

Parameters

m: Matrix4
the matrix.

Returns

float

See also