instance method Rational#abs

abs -> Rational[permalink][rdoc][edit]
magnitude -> Rational

自身の絶対値を返します。



Rational(1, 2).abs     # => (1/2)
Rational(-1, 2).abs    # => (1/2)