Documentation / @interstellar-tools/equations / rot1
Function: rot1()
ts
function rot1(theta: Radians): Matrix3x3Type;Defined in: helpers/rot-1.ts:38
Construct a right-handed rotation matrix about the x-axis (often written R₁).
This returns the 3×3 direction cosine matrix (DCM) for an active rotation by angle theta around the +X axis, using the common aerospace convention:
Notes:
thetais in radians.- Matrix layout is row-major:
M[row][col]. - Useful for composing 3-1-3 / 3-2-1 sequences (e.g., IAU body orientation) and for general 3D frame transforms in mapping pipelines.
Parameters
| Parameter | Type | Description |
|---|---|---|
theta | Radians | Rotation angle ( |
Returns
3×3 rotation matrix (
Throws
If theta is not a finite number.
Example
ts
// Rotate a vector about +X by 90°:
const R = rot1(Math.PI / 2);