method
to_r
v1_9_3_392 -
Show latest stable
- Class:
Complex
to_r()public
If the imaginary part is exactly 0, returns the real part as a Rational, otherwise a RangeError is raised.
to_r()If the imaginary part is exactly 0, returns the real part as a Rational, otherwise a RangeError is raised.