public double getDistance(XYPoint origin) { XYPoint tmp = getClone(); tmp.reduce(origin); return(tmp.getDistance()); }
public XYPoint rotate(double angle, XYPoint origin) { XYPoint tmp = getClone(); tmp.reduce(origin); tmp = tmp.rotate(angle); tmp.add(origin); return(tmp); }