Flowdock
method

abs

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: Rational
abs() public

Returns the absolute value of rat.

(1/2r).abs    #=> (1/2)
(-1/2r).abs   #=> (1/2)

Rational#magnitude is an alias for Rational#abs.

Show source
Register or log in to add new notes.