Skip to main content

Module math

Module math 

Source
Expand description

Small, dependency-free numerical helpers. Numerical functions used by orbital algorithms.

use pykep_core::math::{linalg::cross, stumpff::stumpff_c};

assert_eq!(cross(&[1.0, 0.0, 0.0], &[0.0, 1.0, 0.0])?, [0.0, 0.0, 1.0]);
assert!((stumpff_c(0.0)? - 0.5).abs() < f64::EPSILON);

Modulesยง

kepler_equations
Kepler-equation residuals and derivatives. Residuals and derivatives for elliptic, hyperbolic, and universal Kepler equations.
linalg
Fixed-size vector and matrix operations. Allocation-free operations for small fixed vectors and matrices.
stumpff
Numerically stable Stumpff functions. Stumpff functions used by universal-variable formulations.