method

abs

Importance_1
v2_5_5 - Show latest stable - 0 notes - Class: Integer
abs() public

Returns the absolute value of int.

(-12345).abs   #=> 12345
-12345.abs     #=> 12345
12345.abs      #=> 12345

Integer#magnitude is an alias for Integer#abs.

Show source
Register or log in to add new notes.