public class XyPolar extends java.lang.Object implements Immutable
Copyright 2007 Partner Software, Inc.
| Constructor and Description |
|---|
XyPolar(double radius,
XyDirection direction)
Create a new polar coordinate with the given radius and angle.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public XyPolar(double radius,
XyDirection direction)
radius - (in whatever units X and Y are in)direction - direction of polar vectorpublic 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()