Complex.fromReal constructor

const Complex.fromReal(
  1. double real
)

Creates a complex number having only the real part, meaning that the imaginary part is set to 0.

Implementation

const Complex.fromReal(this.real) : imaginary = 0;