use "Earths" as unit for Jupiter/Sun (instead of Suns)
This commit is contained in:
parent
ed75c225e4
commit
2310fdf83d
|
@ -159,9 +159,7 @@ pub fn readable_speed(speed: f64) -> String {
|
||||||
|
|
||||||
/// Unit: kg
|
/// Unit: kg
|
||||||
pub fn readable_mass(value: f64) -> String {
|
pub fn readable_mass(value: f64) -> String {
|
||||||
if value > SOL_MASS * 0.0001 {
|
if value > EARTH_MASS * 0.0001 {
|
||||||
return format!("{:.5} Suns", value / SOL_MASS);
|
|
||||||
} else if value > EARTH_MASS * 0.0001 {
|
|
||||||
return format!("{:.5} Earths", value / EARTH_MASS);
|
return format!("{:.5} Earths", value / EARTH_MASS);
|
||||||
} else if value > 1e6 {
|
} else if value > 1e6 {
|
||||||
return format!("{value:.2e} kg").replace("e", " x 10^");
|
return format!("{value:.2e} kg").replace("e", " x 10^");
|
||||||
|
|
Loading…
Reference in a new issue