Class: Float

Inherits:
Object show all
Defined in:
lib/primitive_wrapper.rb

Instance Method Summary collapse

Instance Method Details

#to_fraction(pcnt = nil) ⇒ Object



882
883
884
# File 'lib/primitive_wrapper.rb', line 882

def to_fraction(pcnt=nil)
  Fraction.approximate_by_float(self, pcnt)
end