From 2310fdf83d1a7b0bd15b151fdcdb634b57a44fb8 Mon Sep 17 00:00:00 2001 From: yuni Date: Sat, 30 Nov 2024 00:56:06 +0100 Subject: [PATCH] use "Earths" as unit for Jupiter/Sun (instead of Suns) --- src/nature.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nature.rs b/src/nature.rs index 7c0408e..38cafbc 100644 --- a/src/nature.rs +++ b/src/nature.rs @@ -159,9 +159,7 @@ pub fn readable_speed(speed: f64) -> String { /// Unit: kg pub fn readable_mass(value: f64) -> String { - if value > SOL_MASS * 0.0001 { - return format!("{:.5} Suns", value / SOL_MASS); - } else if value > EARTH_MASS * 0.0001 { + if value > EARTH_MASS * 0.0001 { return format!("{:.5} Earths", value / EARTH_MASS); } else if value > 1e6 { return format!("{value:.2e} kg").replace("e", " x 10^");