Flowdock
method

magnitude

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - 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.

Show source
Register or log in to add new notes.