mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 12:12:00 +03:00
what goes up must come down
Showing both the change in climb and then change in descent is redundant, since they'll always be equal given the same start/end.
This commit is contained in:
parent
915b902c9a
commit
8fd63f00db
@ -492,21 +492,8 @@ fn compare_routes(
|
||||
txt.append(
|
||||
Line(format!("{} less ↑", (-up).to_string(&app.opts.units))).fg(Color::GREEN),
|
||||
);
|
||||
txt.append(Line(", "));
|
||||
} else if up > Distance::ZERO {
|
||||
txt.append(Line(format!("{} more ↑", up.to_string(&app.opts.units))).fg(Color::RED));
|
||||
txt.append(Line(", "));
|
||||
}
|
||||
|
||||
// Unclear if more down should be "good" or "bad", so we'll omit color
|
||||
let down = alt.total_down - main.total_down;
|
||||
if down < Distance::ZERO {
|
||||
txt.append(Line(format!(
|
||||
"{} less ↓",
|
||||
(-down).to_string(&app.opts.units)
|
||||
)));
|
||||
} else if down > Distance::ZERO {
|
||||
txt.append(Line(format!("{} more ↓", down.to_string(&app.opts.units))));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user