nyx_space::utils

Function r1

source
pub fn r1(angle_rad: f64) -> Matrix3<f64>
Expand description

Returns a rotation matrix for a rotation about the X axis.

§Arguments

  • angle_rad - The angle of rotation in radians.

§Warning

This function returns a matrix for a COORDINATE SYSTEM rotation by angle_rad radians. When this matrix is applied to a vector, it rotates the vector by -angle_rad radians, not angle_rad radians. Applying the matrix to a vector yields the vector’s representation relative to the rotated coordinate system.

§Example

use nyx_space::utils::r1;

let angle_rad = std::f64::consts::PI / 2.0;
let rotation_matrix = r1(angle_rad);

§Source

NAIF SPICE Toolkit