|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.complex.ComplexUtils
public class ComplexUtils
Static implementations of common
Complex
utilities functions.
Method Summary | |
---|---|
static Complex |
polar2Complex(double r,
double theta)
Creates a complex number from the given polar representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Complex polar2Complex(double r, double theta)
The value returned is r·ei·theta
,
computed as r·cos(theta) + r·sin(theta)i
If either r
or theta
is NaN, or
theta
is infinite, Complex.NaN
is returned.
If r
is infinite and theta
is finite,
infinite or NaN values may be returned in parts of the result, following
the rules for double arithmetic.
Examples:
polar2Complex(INFINITY, π/4) = INFINITY + INFINITY i
polar2Complex(INFINITY, 0) = INFINITY + NaN i
polar2Complex(INFINITY, -π/4) = INFINITY - INFINITY i
polar2Complex(INFINITY, 5π/4) = -INFINITY - INFINITY i
r
- the modulus of the complex number to createtheta
- the argument of the complex number to create
r·ei·theta
IllegalArgumentException
- if r is negative
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |