method

abs

v1_9_2_180 - Show latest stable - Class: Numeric
abs()
public

Returns the absolute value of num.

12.abs         #=> 12
(-34.56).abs   #=> 34.56
-34.56.abs     #=> 34.56