Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Extends Float class to make it possible rounding wiht more decimals
- Float.class_eval do
- alias :original_round :round
- def round(decs = 0)
- (self * 10 ** decs).original_round.to_f / 10 ** decs
- end
- end
Add Comment
Please, Sign In to add comment