Skip to content

Commit

Permalink
fix running formula (#73)
Browse files Browse the repository at this point in the history
Co-authored-by: Владислав Попов <[email protected]>
  • Loading branch information
lekan-pvp and lekan-rust authored Nov 7, 2023
1 parent 31864eb commit 0baae88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/fitnesstest/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *FitnessSuite) TestRunningSpentCalories() {
weightNum := float64(rnd.Int63n(140-80) + 80)

meanSpeed := testMeanSpeed(actionsNum, durationNum)
expected := ((_runningCaloriesMeanSpeedMultiplier * meanSpeed * _runningCaloriesMeanSpeedShift) * weightNum / _mInKm * durationNum * _minInH)
expected := ((_runningCaloriesMeanSpeedMultiplier*meanSpeed + _runningCaloriesMeanSpeedShift) * weightNum / _mInKm * durationNum * _minInH)

res := RunningSpentCalories(actionsNum, weightNum, durationNum)
s.Assert().InDelta(expected, res, 0.05, "Значение полученное из функции RunningSpentCalories не совпадает с ожидаемым")
Expand Down

1 comment on commit 0baae88

@skosovsky
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Коммит ошибочный, формула становится некорректной.

Please sign in to comment.