The transpose of a Matrix3 or Matrix4 (rows become columns), as a new matrix; given a pointer, it transposes in place. For a rotation matrix the transpose is the inverse.
m := Matrix3.{ 1, 2, 3, 4, 5, 6, 7, 8, 9 };
t := transpose(m);
assert(t._12 == 4 && t._21 == 2);
transpose(*m);
assert(m == t);transpose :: (m: Matrix3) -> Matrix3
The matrix with rows and columns swapped.
Parameters
- m: Matrix3
- the matrix.
Returns
transpose :: (m: Matrix4) -> Matrix4
The matrix with rows and columns swapped.
Parameters
- m: Matrix4
- the matrix.
Returns
transpose :: (m: *Matrix3)
Swaps rows and columns in place.
Parameters
- m: *Matrix3
- the matrix to change.
transpose :: (m: *Matrix4)
Swaps rows and columns in place.
Parameters
- m: *Matrix4
- the matrix to change.