public Polar(int x, int y, int r, int theta) { init(); length = r; angle = theta; normalizeAngle(); origin = new Point(x, y); setRect(); }
public void setAngle(int val) { angle = val; normalizeAngle(); rect = null; }
public void addAngle(int val) { angle += val; normalizeAngle(); rect = null; }
private Point getPoint() { normalizeAngle(); int x = ((int) ((double) length * cos[angle])) + origin.x; int y = ((int) ((double) length * sin[angle])) + origin.y; return new Point(x, y); }