Complex class

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.
no setterinherited
imaginary double
final
real double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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