method

abs

v1_8_6_287 - 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