complex
v0.7.2A representation of a complex number, i.e. a number which has both a real and imaginary part.
Package archive: https://pubdev.letsnova.ru/api/archives/complex/0.7.2.tar.gz
dart pub add complexReadme
Complex
A representation of a complex number, i.e. a number which has both a real and an imaginary part.
Translated from The Apache Commons Mathematics Library into Dart.
Implementations of arithmetic operations handle NaN and
infinite values according to the rules for double, i.e.
== is an equivalence relation for all instances that have
a NaN in either real or imaginary part, e.g. the following are
considered equal:
1 + NaNiNaN + iNaN + NaNi
Note that this is in contradiction with the IEEE-754 standard for floating
point numbers (according to which the test x == x must fail if
x is NaN).
Example
const z1 = Complex(1);
const z2 = Complex(3, 4);
print(z1.abs()); // 1.0
print(z2.abs()); // 5.0
print(z2.conjugate()); // (3.0, -4.0)
Changelog
0.7.2
- Adding example
- Enhancing readme
0.7.1
- Adding very good analysis (linter)
- Enhancing syntax based on linter and null-safety
0.7.0
- Migrated to null-safety
- Some test fixed
0.6.1
- Adding docs for constructors
- Complex constructos as cons constructor
- constants with better usage of effective dart
0.6.0
- Adding Cartesian and Polar complex.
0.5.0
- Compatible with Dart 2
