Complex numbers functions.
Complex number is represented as Vec2 type (from [[clojure2d.math.vector]] namespace).
To create complex number use complex, [[vec2]] or [[->Vec2]].
Implementation checks for ##Inf, ##NaN and some of the function distinguish +0.0 and -0.0
Complex numbers functions. Complex number is represented as `Vec2` type (from [[clojure2d.math.vector]] namespace). To create complex number use [[complex]], [[vec2]] or [[->Vec2]]. Implementation checks for ##Inf, ##NaN and some of the function distinguish +0.0 and -0.0
(arg z)Argument (angle) of the complex number
Argument (angle) of the complex number
(complex)(complex a)(complex a b)Create complex number. Represented as Vec2.
Create complex number. Represented as `Vec2`.
(conjugate z)Complex conjugate. \(\bar{z}\)
Complex conjugate. \\(\bar{z}\\)
(csgn z)(csgn re im)Complex sgn.
Returns 0 for 0+0i or calls m/sgn on real part otherwise.
Complex sgn. Returns `0` for `0+0i` or calls `m/sgn` on real part otherwise.
(delta-eq q1 q2)(delta-eq q1 q2 accuracy)Compare complex numbers with given accuracy (10e-6 by default)
Compare complex numbers with given accuracy (10e-6 by default)
(flip z)Exchange imaginary and real parts
Exchange imaginary and real parts
(imaginary? z)Is z is a pure imaginary number?
Is z is a pure imaginary number?
(norm z)Norm (Guass) of the complex number, absolute value squared
Norm (Guass) of the complex number, absolute value squared
(sqrt z)Sqrt of complex number. \(\sqrt{z}\)
Sqrt of complex number. \\(\sqrt{z}\\)
(sub z1 z2)Difference of two complex numbers
Difference of two complex numbers
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |