class Float
Public Instance Methods
decimals(places)
click to toggle source
# File lib/geohash.rb, line 8 def decimals(places) n = (self * (10 ** places)).round n.to_f/(10**places) end
# File lib/geohash.rb, line 8 def decimals(places) n = (self * (10 ** places)).round n.to_f/(10**places) end