Matrix.constant

Returns a constant matrix.

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

Examples

auto matrix = Matrix!(int, 2, 3).constant(7);
assert (matrix.v == [7, 7, 7, /**/ 7, 7, 7]);

Meta