Math module

column

procedure · 1 overloadSource

Column i (0-based) of a Matrix4 as a Vector4. Column 3 is the translation. No range check.

ExampleOpen in playground ↗
m := make_translation_matrix4(xyz(1, 2, 3));
assert(column(m, 3) == xyzw(1, 2, 3, 1));
column :: (m: Matrix4, i: int) -> Vector4

The ith column of the matrix, counting from 0.

Parameters

m: Matrix4
the matrix.
i: int
the column index, 0 to 3.

Returns

See also