Methods of Float64
-
abs
-
round
x = -5.2
p! x.abs # 5.2
p! x.round # -5.0
# p! x.even? # Undefined method even? for Float64
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
abs
round
x = -5.2
p! x.abs # 5.2
p! x.round # -5.0
# p! x.even? # Undefined method even? for Float64