add comment

This commit is contained in:
yuni 2024-06-08 02:34:18 +02:00
parent 797b106255
commit 159dfe8e19

View file

@ -163,6 +163,7 @@ pub fn inverse_lorentz_factor_custom_c(speed: f64, c: f64) -> f64 {
(1.0 - (speed.powf(2.0) / c.powf(2.0))).sqrt() (1.0 - (speed.powf(2.0) / c.powf(2.0))).sqrt()
} }
/// Calculates orbit duration in seconds, with given parameters, assuming circular orbit.
pub fn simple_orbital_period(mass: f64, distance: f64) -> f64 { pub fn simple_orbital_period(mass: f64, distance: f64) -> f64 {
return 2.0 * PI * (distance.powf(3.0) / (G * mass)).sqrt(); return 2.0 * PI * (distance.powf(3.0) / (G * mass)).sqrt();
} }