method
magnitude
v2_5_5 -
Show latest stable
- Class:
Integer
magnitude()public
Returns the absolute value of int.
(-12345).abs #=> 12345 -12345.abs #=> 12345 12345.abs #=> 12345
Integer#magnitude is an alias for Integer#abs.
magnitude()Returns the absolute value of int.
(-12345).abs #=> 12345 -12345.abs #=> 12345 12345.abs #=> 12345
Integer#magnitude is an alias for Integer#abs.