Numeric (Class)

In: basiclibrary.rb
Parent: Object

Extensions to the Numeric class

Methods

round_to  

Public Instance methods

Rounds to the specified number of decimal places, returning a string value.

  (1.234).round_to(2)   =>  '1.23'
  (-1.234).round_to(2)  =>  '-1.23'
  (-0.007).round_to(2)   => '-0.01'
  (-0.007).round_to(1)   => '0.0'

[Validate]