Documentation / @interstellar-tools/equations / transpose3
Function: transpose3()
ts
function transpose3(A: Matrix3x3Type): Matrix3x3Type;Defined in: helpers/transpose-3.ts:51
Transpose a 3×3 matrix (row-major).
For a matrix:
the transpose is:
Notes:
- Matrices are treated as row-major:
A[row][col]. - For rotation matrices / DCMs, the transpose is also the inverse:
.
Parameters
| Parameter | Type | Description |
|---|---|---|
A | Matrix3x3Type | 3×3 matrix (row-major). |
Returns
Transposed matrix Aᵀ (row-major).
Example
ts
const A: Matrix3x3Type = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
const AT = transpose3(A);
// [
// [1, 4, 7],
// [2, 5, 8],
// [3, 6, 9]
// ]