Skip to main content

lorentz_factor

Function lorentz_factor 

Source
pub fn lorentz_factor(speed: f64) -> Option<f64>
Expand description

Computes the Lorentz factor γ from a speed magnitude in meters per second.

This helper delegates to beta and then to lorentz_factor_from_beta.

§Examples

use use_relativity::{SPEED_OF_LIGHT, lorentz_factor};

assert!((lorentz_factor(SPEED_OF_LIGHT * 0.6).unwrap() - 1.25).abs() < 1.0e-12);