method

abs

Importance_1
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.