Matrix.opCast

struct Matrix(T, ubyte R, ubyte C = R, MatrixOrder O = CurrentMatrixOrder)
pure nothrow const @safe @nogc
static if(O == MatrixOrder.RowMajor)
U
opCast
(
U
)
()
if (
U.rowCount == rowCount
&&
U.columnCount == columnCount
)
if (
R >= 2 &&
R <= 4
&&
C >= 2
&&
C <= 4
)

Examples

auto m1 = Matrix2F(3.2f, 4.5f, /**/ 3.8f, -7.2f);
Matrix2I m2 = cast(Matrix2I)m1;
assert (m2.v == [3, 4, /**/ 3, -7]);

Meta