method

Float

Importance_1
Ruby latest stable (v1_8_7_72) - 0 notes - Class: Kernel
Float(p1) public

Returns arg converted to a float. Numeric types are converted directly, the rest are converted using arg.to_f. As of Ruby 1.8, converting nil generates a TypeError.

   Float(1)           #=> 1.0
   Float("123.456")   #=> 123.456
Show source
Register or log in to add new notes.