org.openmali.angle
Class PolarCoordinate2f

java.lang.Object
  extended by org.openmali.angle.PolarCoordinate2f

public class PolarCoordinate2f
extends java.lang.Object

Two-dimensional floating point polar coordinate.


Constructor Summary
PolarCoordinate2f()
          Constructor for PolarCoordinate2f.
 
Method Summary
 Vector2f add(Vector2f vec)
          Adds this polar coordinate to the specified vector2f
 void add(Vector2f src, Vector2f dest)
          Adds this polar coordinate to the specified vector2f and place the result in a destination vector2f
 float getAngle()
           
 float getRadius()
           
 void set(float radius, float angle)
          Set the polar coordinates.
 void set(PolarCoordinate2f src)
          Sets the polar coordinates from another polar coordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolarCoordinate2f

public PolarCoordinate2f()
Constructor for PolarCoordinate2f.

Method Detail

getRadius

public float getRadius()
Returns:
the radius

getAngle

public float getAngle()
Returns:
the angle

set

public void set(float radius,
                float angle)
Set the polar coordinates.

Parameters:
radius - The new radius
angle - The new angle, in degrees

set

public void set(PolarCoordinate2f src)
Sets the polar coordinates from another polar coordinate.

Parameters:
src - The source polar coordinate

add

public Vector2f add(Vector2f vec)
Adds this polar coordinate to the specified vector2f

Parameters:
vec - The vector to modify
Returns:
vec

add

public void add(Vector2f src,
                Vector2f dest)
Adds this polar coordinate to the specified vector2f and place the result in a destination vector2f

Parameters:
src - The source vector to modify
dest - The destination result