From 159dfe8e1943eaaf8c256301b32a9f6b49d75be4 Mon Sep 17 00:00:00 2001 From: yuni Date: Sat, 8 Jun 2024 02:34:18 +0200 Subject: [PATCH] add comment --- src/nature.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nature.rs b/src/nature.rs index 6b47701..fa35ab1 100644 --- a/src/nature.rs +++ b/src/nature.rs @@ -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() } +/// Calculates orbit duration in seconds, with given parameters, assuming circular orbit. pub fn simple_orbital_period(mass: f64, distance: f64) -> f64 { return 2.0 * PI * (distance.powf(3.0) / (G * mass)).sqrt(); }