mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
fix Daniels EqP when Time Riding == 0.0
This commit is contained in:
@@ -128,7 +128,7 @@ class DanielsEquivalentPower : public RideMetric {
|
||||
assert(timeRiding);
|
||||
double score = danielsPoints->value(true);
|
||||
double secs = timeRiding->value(true);
|
||||
watts = cp * pow(score / DanielsPoints::K / secs, 0.25);
|
||||
watts = secs == 0.0 ? 0.0 : cp * pow(score / DanielsPoints::K / secs, 0.25);
|
||||
|
||||
setValue(watts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user