|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyPolar
public class XyPolar
A polar coordinate in (x, y) space. Actually, strictly speaking polars are in (r, theta) space but they are useful when doing trigonometry on (x, y) cartesian planes.
Copyright 2007 Partner Software, Inc.
| Constructor Summary | |
|---|---|
XyPolar(double radius,
XyDirection direction)
Create a new polar coordinate with the given radius and angle. |
|
| Method Summary | |
|---|---|
XyDirection |
getDirection()
The angular coordinate. |
double |
getRadius()
The radial coordinate, in whatever units X and Y are in. |
XyPolar |
rotatedBy(XyRotation rotation)
Returns a rotated version of this polar. |
XyPoint |
toPoint()
Returns the polar coordinate as an (x, y) point. |
java.lang.String |
toString()
|
XyVector |
toVector()
Returns the vector equivalent of this polar coordinate. |
XyPolar |
withDirection(XyDirection newDirection)
Returns a modified version of this polar with the given direction. |
XyPolar |
withRadius(double newRadius)
Returns a modified version of this polar with the given radius. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XyPolar(double radius,
XyDirection direction)
radius - (in whatever units X and Y are in)direction - direction of polar vector| Method Detail |
|---|
public XyPolar withRadius(double newRadius)
public XyPolar withDirection(XyDirection newDirection)
public XyPolar rotatedBy(XyRotation rotation)
public XyPoint toPoint()
public XyVector toVector()
public java.lang.String toString()
toString in class java.lang.Objectpublic double getRadius()
public XyDirection getDirection()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||