Sha256: 3b58597ab4047f063683579d81ab5afde16cc7ab22866d037e9ed8e72ab23a26
Contents?: true
Size: 289 Bytes
Versions: 1
Compression:
Stored size: 289 Bytes
Contents
class Float def round_to(x) (self * 10**x).round.to_f / 10**x end def ceil_to(x) (self * 10**x).ceil.to_f / 10**x end def floor_to(x) (self * 10**x).floor.to_f / 10**x end RAD_PER_DEG = 0.017453293 # PI/180 def rpd self * RAD_PER_DEG end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
haversine-0.2.0 | lib/haversine/core_ext.rb |