Function nyx_space::utils::r3

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

Returns a rotation matrix for a rotation about the Z 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::r3;

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

§Source

NAIF SPICE Toolkit