public class Polar extends Object implements EuclidConstants
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 |
|---|
Polar()
constructor.
|
Polar(Complex c)
constructor.
|
Polar(double a,
Angle b)
constructor.
|
Polar(double x,
double y)
constructor.
|
Polar(Polar a)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Polar |
divideBy(Polar f)
divide a polar by a polar
|
double |
getR()
gets radial part
|
Angle |
getTheta()
gets angular part
|
double |
getX()
get X, Y and XY coords
|
Real2 |
getXY()
get coordinates.
|
double |
getY()
get y.
|
boolean |
isEqualTo(Polar a)
are two polar equal
|
Polar |
multiplyBy(double f)
multiply a polar by a scalar
|
Polar |
multiplyBy(Polar f)
multiply a polar by a polar
|
Polar |
plus(Polar a2)
add two polars
|
void |
subtract()
unary minus
|
Polar |
subtract(Polar a2)
subtract two polars
|
String |
toString()
to string.
|
public Polar()
public Polar(double x,
double y)
x - y - public Polar(double a,
Angle b)
a - b - public Polar(Complex c)
c - public Polar(Polar a)
a - public double getR()
public Angle getTheta()
public void subtract()
public Polar multiplyBy(Polar f)
f - public Polar multiplyBy(double f)
f - public Polar divideBy(Polar f) throws EuclidRuntimeException
f - EuclidRuntimeExceptionpublic boolean isEqualTo(Polar a)
a - public double getX()
public double getY()
public Real2 getXY()
Copyright © 1994–2024 Peter Murray-Rust. All rights reserved.