Complex.fromRealFraction constructor

Complex.fromRealFraction(
  1. Fraction real
)

Creates a complex number having only the real part, which is expressed as a Fraction. The imaginary part is set to 0.

Implementation

Complex.fromRealFraction(Fraction real)
    : real = real.toDouble(),
      imaginary = 0;