Matrix constructors
Matrices have three kinds of constructors:
Zero-value constructor: matCxRf() or matCxR<f32>()
Example
mat3x2f()
constructs amat3x2f
with zero-values for each of the elements.
Column-wise constructor: matCxR<f32>(column_0, column_1, …)
Example
mat2x4f(c0, c1)
constructs amat2x4<f32>
, when bothc0
andc1
are of typevec4<f32>
.
The first column isc0
, and the second column isc1
.Scalar-wise constructor: matCxR<f32>(column_0_row_0, column_0_row_1, …)
Example
mat2x3f(a, b, c, d, e, f)
constructs amat2x3<f32>
with the given elements:╭ ╮ │ a d │ │ b e │ │ c f │ ╰ ╯