~starkingdoms/starkingdoms

ref: 42c011904171e3e34895263e72fc6b6b29521e50 starkingdoms/server/src/orbit/vis_viva.rs -rw-r--r-- 209 bytes
42c01190 — core change api and game urls (this should be the final in the flurry of commits i have pushed recently) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
pub fn vis_viva(
    distance_between_centers: f64,
    semi_major: f64,
    g: f64,
    mass_of_bigger: f64,
) -> f64 {
    (g * mass_of_bigger * (2.0 / distance_between_centers - 1.0 / semi_major)).sqrt()
}