Speed.ZERO as constant.

This commit is contained in:
Dennis Guse
2025-11-02 08:30:15 +01:00
parent a5e5d0ca51
commit fffeb40200
15 changed files with 42 additions and 45 deletions
@@ -188,7 +188,7 @@ public class SegmentStatisticUpdater {
totalTime = Duration.ofSeconds(0);
movingTime = Duration.ofSeconds(0);
totalDistance = Distance.of(0);
maxSpeed = Speed.zero();
maxSpeed = Speed.ZERO;
totalAltitudeGain_m = null;
totalAltitudeLoss_m = null;
@@ -305,7 +305,7 @@ public class SegmentStatisticUpdater {
*/
public Speed getAverageSpeed() {
if (totalTime.isZero()) {
return Speed.of(0);
return Speed.ZERO;
}
return Speed.of(totalDistance.toM() / totalTime.getSeconds());
}