Skip to content

Commit

Permalink
rounding error
Browse files Browse the repository at this point in the history
  • Loading branch information
jjwyse committed Nov 7, 2014
1 parent 87baf0d commit def0fe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/strava-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function secondsToTime(seconds) {

function secondsToPace(seconds, miles) {
var secondsPerMile = Math.round((seconds / miles) * 1) / 1;
var pace = Math.round((secondsPerMile / 60) * 1) / 1;
var pace = Math.floor(secondsPerMile / 60);
var secondsLeft = secondsPerMile % 60;
var responseString = pace.toString() + ':' + secondsLeft.toString();
if (secondsLeft < 10) {
Expand Down

0 comments on commit def0fe8

Please sign in to comment.