File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class Workout {
2222 public float averageWatts ;
2323 public float caloriesBurnt ;
2424 const float humanMetabolicEfficiency = .24f ;
25- const float julesToCalories = 4.184f ;
25+ const float julesToCalories = 1f / 4184f ;
2626
2727 public float totalAscent ;
2828 public float totalDescent ;
@@ -65,7 +65,8 @@ float currentHeight
6565 averageHeartRate = totalHeartRate / totalTime_s ;
6666 averageSpeed_kmH = totalSpeed_kmH / totalTime_s ;
6767 averageWatts = totalPower / totalTime_s ;
68- caloriesBurnt = averageWatts * totalTime_s * humanMetabolicEfficiency * julesToCalories ;
68+
69+ caloriesBurnt = averageWatts * totalTime_s * julesToCalories / humanMetabolicEfficiency ;
6970 }
7071
7172 public static Workout Load ( string name ) {
You can’t perform that action at this time.
0 commit comments