Permalink
Browse files

Updating some of the math for unit conversion.

  • Loading branch information...
1 parent dfb057e commit 9c5637d6ee8a17b8ba7c07b388411933f469459f Zach Holman committed Aug 20, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/nikeplus/run.rb
View
@@ -10,7 +10,7 @@ def initialize(run)
end
def distance=(s)
- @distance = s.to_i
+ @distance = s.to_f
end
def duration=(s)
@@ -26,7 +26,7 @@ def seconds
end
def miles
- "%.2f" % (@distance/0.621371192)
+ "%.2f" % (@distance * 0.621371192)
end
end
end

0 comments on commit 9c5637d

Please sign in to comment.