|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.layout.PolarPoint
public class PolarPoint
allows creation of points in polar coordinates. also allows conversions between polar and cartesian coordinates.
Constructor Summary | |
---|---|
PolarPoint()
|
|
PolarPoint(double theta,
double radius)
|
Method Summary | |
---|---|
static PolarPoint |
cartesianToPolar(double x,
double y)
Returns the result of converting (x, y) to polar coordinates. |
static PolarPoint |
cartesianToPolar(Point2D point)
Returns the result of converting point to polar coordinates. |
double |
getRadius()
|
double |
getTheta()
|
static Point2D |
polarToCartesian(double theta,
double radius)
Returns the result of converting (theta, radius) to Cartesian coordinates. |
static Point2D |
polarToCartesian(PolarPoint polar)
Returns the result of converting polar to Cartesian coordinates. |
void |
setLocation(PolarPoint p)
|
void |
setRadius(double radius)
|
void |
setTheta(double theta)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PolarPoint()
public PolarPoint(double theta, double radius)
Method Detail |
---|
public double getTheta()
public double getRadius()
public void setTheta(double theta)
public void setRadius(double radius)
public static Point2D polarToCartesian(PolarPoint polar)
polar
to Cartesian coordinates.
public static Point2D polarToCartesian(double theta, double radius)
(theta, radius)
to Cartesian coordinates.
public static PolarPoint cartesianToPolar(Point2D point)
point
to polar coordinates.
public static PolarPoint cartesianToPolar(double x, double y)
(x, y)
to polar coordinates.
public String toString()
toString
in class Object
public void setLocation(PolarPoint p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |