public class Complex extends Real2
C_AMP, C_APOS, C_ATSIGN, C_BACKSLASH, C_BACKSPACE, C_CARET, C_COLON, C_COMMA, C_DEL, C_DOLLAR, C_EQUALS, C_FORMFEED, C_HASH, C_LANGLE, C_LBRAK, C_LCURLY, C_LSQUARE, C_MINUS, C_NBSP, C_NEWLINE, C_NL, C_PERCENT, C_PERIOD, C_PIPE, C_PLUS, C_POUND, C_QUERY, C_QUOT, C_RANGLE, C_RBRAK, C_RCURLY, C_RETURN, C_RSQUARE, C_SEMICOLON, C_SHRIEK, C_SLASH, C_SPACE, C_STAR, C_TAB, C_TILDE, C_UNDER, EPS, F_S, NONWHITEPUNC, NONWHITEPUNC0, NONWHITEPUNC0REGEX, ONE_THIRD, PUNC, S_AMP, S_APOS, S_ATSIGN, S_BACKSLASH, S_CARET, S_COLON, S_COMMA, S_DOLLAR, S_EMPTY, S_EQUALS, S_FORMFEED, S_HASH, S_LANGLE, S_LBRAK, S_LCURLY, S_LSQUARE, S_MINUS, S_NEWLINE, S_NL, S_PERCENT, S_PERIOD, S_PIPE, S_PLUS, S_POUND, S_QUERY, S_QUOT, S_RANGLE, S_RBRAK, S_RCURLY, S_RETURN, S_RSQUARE, S_SEMICOLON, S_SHRIEK, S_SLASH, S_SPACE, S_STAR, S_TAB, S_TILDE, S_UNDER, S_WHITEREGEX, TWO_THIRDS, U_S, WHITESPACE| Constructor and Description |
|---|
Complex()
constructor.
|
Complex(Complex a)
copy constructor
|
Complex(double a)
real component only
|
Complex(double r,
Angle th)
in polar coords
|
Complex(double a,
double b)
from components
|
Complex(Polar p)
construct from polar
|
Complex(Real2 a)
from base class
|
| Modifier and Type | Method and Description |
|---|---|
Complex |
divideBy(Complex f)
divide a complex by a complex.
|
double |
getImaginary()
gets imaginary part.
|
Polar |
getPolar()
polar object.
|
double |
getR()
get as polar coords.
|
double |
getReal()
gets real part.
|
Angle |
getTheta()
angle.
|
Complex |
multiply(Complex f)
multiply a complex by a complex.
|
void |
negative()
unary minus MODIFIES object
|
static Complex |
sqrt(Complex a)
complex square root.
|
String |
toString()
to string.
|
addPolygonOnLine, clear, createFromString, dotProduct, elementAt, format, getAngle, getAngle, getCentroid, getDistance, getDistanceMatrix, getLength, getMidPoint, getSerialOfNearestPoint, getSquaredDistance, getTransformed, getUnitVector, getX, getXY, getY, isEqualTo, isEqualTo, isOrigin, isOrigin, makePoint, multiplyBy, multiplyEquals, plus, plusEquals, setX, setY, sortAscending, sortDescending, subtract, swap, transformBypublic Complex()
public Complex(double a)
a - public Complex(double a,
double b)
a - b - public Complex(Real2 a)
a - public Complex(double r,
Angle th)
r - th - public Complex(Polar p)
p - public Complex(Complex a)
a - public double getReal()
public double getImaginary()
public Complex multiply(Complex f)
f - public Complex divideBy(Complex f) throws EuclidRuntimeException
f - EuclidRuntimeExceptionpublic double getR()
public Angle getTheta()
public Polar getPolar()
public static Complex sqrt(Complex a)
a - Copyright © 1994–2024 Peter Murray-Rust. All rights reserved.