In Files

Parent

Float

Public Instance Methods

ceil_to(x) click to toggle source
# File lib/float.rb, line 7
def ceil_to(x)
  (self * 10**x).ceil.to_f / 10**x
end
floor_to(x) click to toggle source
# File lib/float.rb, line 11
def floor_to(x)
  (self * 10**x).floor.to_f / 10**x
end
round_to(x) click to toggle source
# File lib/float.rb, line 3
def round_to(x)
  (self * 10**x).round.to_f / 10**x
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.