|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.VectorG
vec_math.vector2D
vec_math.polar2D
public class polar2D
Extends the vector2D for capabilities to convert (x,y) into (r,phi).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class vec_math.VectorG |
|---|
VectorG.CloneTest, VectorG.EuclidianMetric, VectorG.LengthComparator, VectorG.Metric |
| Field Summary | |
|---|---|
protected double[] |
r
|
protected boolean |
RPhiValid
|
| Fields inherited from class vec_math.VectorG |
|---|
a |
| Constructor Summary | |
|---|---|
protected |
polar2D()
|
|
polar2D(double x,
double y)
Constructor chain. |
| Method Summary | |
|---|---|
protected void |
calcRPhi()
Calculates radius and azimuth of this vector. |
static polar2D |
getFromRPhi(double r,
double phi)
Returns a new polar2D object. |
protected static double |
getX(double r,
double phi)
Calculates x out of r and phi. |
protected static double |
getY(double r,
double phi)
Calculates y out of r and phi. |
static void |
main(String[] arg)
Test purpose only. |
double |
Phi()
Returns the azimuth. |
double |
R()
Returns the radius. |
void |
set(int index,
double val)
Sets the specified coordinate. |
| Methods inherited from class vec_math.vector2D |
|---|
setX, setY, toString, X, Y |
| Methods inherited from class vec_math.VectorG |
|---|
add, clone, dimension, direct, directDivide, directMultiply, dot, doubleParse, equalData, equals, fillFrom, fillFrom, fromDoubles, fromString, get, getAsArray, getLength, hashCode, match, match, multiply, parse, search, searchMinMax, sort, sortToLength, subtract |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean RPhiValid
protected double[] r
| Constructor Detail |
|---|
protected polar2D()
public polar2D(double x,
double y)
| Method Detail |
|---|
public static polar2D getFromRPhi(double r,
double phi)
r - Radius.phi - Azimuth in radians.public double R()
public double Phi()
public void set(int index,
double val)
set in class VectorGindex - Index in coordinate array.val - New valueprotected void calcRPhi()
protected static double getX(double r,
double phi)
r - Radius.phi - Azimuth in radians.getFromRPhi(double, double)
protected static double getY(double r,
double phi)
r - Radius.phi - Azimuth in radians.getFromRPhi(double, double)public static void main(String[] arg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||