cos method Null safety

Complex cos()

Implementation

Complex cos() =>
    const Complex(0.5, 0) *
    ((const Complex(0, 1) * this).exp() +
        (const Complex(0, -1) * this).exp());