Complex constructor

const Complex(
  1. num real, [
  2. num imag = 0.0
])

Creates a standard complex number. If the imaginary part is not provided, it defaults to 0.0.

Implementation

const Complex(num real, [num imag = 0.0])
  : _real = real + 0.0,
    _imag = imag + 0.0;