Complex class Null safety

Class to create and handle a complex numbers.

Constructors:

Complex({this.real = 0, this.imaginary = 0}) // default constructor.

Complex.ri(this.real, this.imaginary) // constructor with

References

  1. "Complex number representation in Dart". https://github.com/rwl/complex. Retrieved 2019-07-15.

Examples

import 'package:scidart/src/numdart/numdart.dart';
print(Complex());
print(Complex.ir(3.0, 3.0));

/* output:
Complex(0.0, 0.0)
Complex(3.0, 3.0)
*/

Constructors

Complex({double real = 0, double imaginary = 0})
Complex.ri(double real, double imaginary)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
imaginary double
final
real double
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Convert a Complex object (number) to a String representation [...]
override

Operators

operator *(Complex b) Complex
Multiply two complex number [...]
operator +(Complex b) Complex
Sum two complex number [...]
operator -(Complex b) Complex
Subtract two complex number [...]
operator /(Complex b) Complex
Divide two complex number [...]
operator ==(Object b) bool
Compare two complex number [...]
override