Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updating some of the math for unit conversion.

  • Loading branch information...
commit 9c5637d6ee8a17b8ba7c07b388411933f469459f 1 parent dfb057e
Zach Holman authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/nikeplus/run.rb
4 lib/nikeplus/run.rb
@@ -10,7 +10,7 @@ def initialize(run)
10 10 end
11 11
12 12 def distance=(s)
13   - @distance = s.to_i
  13 + @distance = s.to_f
14 14 end
15 15
16 16 def duration=(s)
@@ -26,7 +26,7 @@ def seconds
26 26 end
27 27
28 28 def miles
29   - "%.2f" % (@distance/0.621371192)
  29 + "%.2f" % (@distance * 0.621371192)
30 30 end
31 31 end
32 32 end

0 comments on commit 9c5637d

Please sign in to comment.
Something went wrong with that request. Please try again.