transposed

Returns a transposed copy of mat.

@safe @nogc pure nothrow
Matrix!(T, R, C)
transposed
(
T
uint C
uint R
)
(
const auto ref Matrix!(T, C, R) mat
)

Examples

float[6] elements = [1, 2, 3, 4, 5, 6];
float[6] transposedElements = [1, 4, 2, 5, 3, 6];
auto m1 = Mat23.fromColumns(elements);
auto m2 = transposed(m1);
assert(m2.elements == transposedElements);
assert(transposed(m1.transposed) == m1);

Meta