Represents a complex number which has a real part and an imaginary part.
▶Example 1
Example 1
import { Complex } from "@babia/complex"; new Complex(1, 9); // 1 + 9i new Complex(14, 6); // 14 + 6i // A complex number can be also created from a real number Complex.fromReal(4); // 4 + 0i Complex.fromReal(32.9); // 32.9 + 0i // or a purely imaginary number Complex.fromImag(11); // 0 + 11i Complex.fromImag(6); // 0 + 6i
Whether either the real part or imaginary part of the complex number is an infinity.
Whether either the real part or imaginary part of the complex number is NaN and neither is an infinity.
Returns a complex number whose real part and imaginary part are both positive infinity.