| Class | Float |
| In: |
lib/facet/float/approx%3F.rb
lib/facet/float/round_off.rb lib/facet/float/round_at.rb lib/facet/float/round_to.rb |
| Parent: | Object |
| round | -> | round_off |
| Alias for round. This is used by both the improved round method and round_to. | ||
Determines if another number is approximately equal within a given _n_th degree. Defaults to 100ths if the degree is not specified.
Rounds to the given decimal position.
require 'facet/float/round' 4.555.round_at(0) #=> 5.0 4.555.round_at(1) #=> 4.6 4.555.round_at(2) #=> 4.56 4.555.round_at(3) #=> 4.555