Static
EStatic
EPSILONStatic
IStatic
INFINITYStatic
NANStatic
ONEStatic
PIStatic
ZEROCalculate the magnitude of the complex number
Calculate the complex arcus cosinus
Calculate the complex acosh
Calculate the complex arcus cotangent
Calculate the complex acoth
Calculate the complex arcus cosecans
Calculate the complex acsch
Calculate the angle of the complex number
Calculate the complex arcus secant
Calculate the complex asech
Calculate the complex arcus sinus
Calculate the complex asinh
Calculate the complex arcus tangent
Calculate the complex atanh
Clones the actual object
Returns the complex conjugate
Calculate the cosine
Calculate the complex cosh
Calculate the cotangent
Calculate the complex coth
Calculate the cosecans
Calculate the complex coth
Calculate the complex exponent
Calculate the complex exponent and subtracts one.
This may be more accurate than Complex(x).exp().sub(1)
if
x
is small.
Calculate the complex inverse 1/z
Determines whether a complex number is not at the infinity pole of the Riemann sphere.
Determines whether or not a complex number is at the infinity pole of the Riemann sphere.
Determines whether a complex number is not on the Riemann sphere.
Determines whether or not a complex number is at the zero pole of the Riemann sphere.
Calculate the natural log
Gets the negated complex number
Calculate the secant
Calculate the complex sech
Calculates the sign of a complex number, which is a normalized complex
Calculate the sine of the complex number
Calculate the complex sinh
Calculate the complex square root
Calculate the tangent
Calculate the complex tanh
Gets a string of the actual complex number
Returns the actual number as a vector
Returns the actual real value of the current object
This class allows the manipulation of complex numbers. You can pass a complex number in different formats. Either as object, double, string or two integer parameters.
Object form { re:, im: }
{ arg: , abs: }
{ phi: , r: }
Array / Vector form [ real, imaginary ]
Double form 99.3 - Single double value
String form '23.1337' - Simple real number '15+3i' - a simple complex number '3-i' - a simple complex number
Example:
var c = new Complex('99.3+8i'); c.mul({r: 3, i: 9}).div(4.9).sub(3, 2);