lib/ruby-vpi/float.rb in ruby-vpi-16.0.1 vs lib/ruby-vpi/float.rb in ruby-vpi-17.0.0
- old
+ new
@@ -2,11 +2,11 @@
#--
# Copyright 2006-2007 Suraj N. Kurapati
# See the file named LICENSE for details.
class String
- # Converts this string into a floating point number using the given radix.
- # The default radix is 10.
+ # Converts this string into a floating point number
+ # using the given radix. The default radix is 10.
def to_f aRadix = 10
whole, frac = split('.', 2)
whole = whole.to_i(aRadix).to_f
if frac