src/org/nutz/lang/Maths.java
public static int[] rotateXY(int x1, int y1, int x2, int y2, double a) {
        double l = (a * Math.PI) / 180;

        double cosv = Math.cos(l);
        double sinv = Math.sin(l);

        int newX = (int) ((x1 - x2) * cosv - (y1 - y2) * sinv + x2);
        int newY = (int) ((x1 - x2) * sinv + (y1 - y2) * cosv + y2);

        return new int[]{newX, newY};
    }
public static int[] rotateXY(int x1, int y1, int x2, int y2, double a) {
        double l = (a * Math.PI) / 180;

        double cosv = Math.cos(l);
        double sinv = Math.sin(l);

        int newX = (int) ((x1 - x2) * cosv - (y1 - y2) * sinv + x2);
        int newY = (int) ((x1 - x2) * sinv + (y1 - y2) * cosv + y2);

        return new int[]{newX, newY};
    }
坐标点旋转计算方法。

坐标点（x1,y1）绕另一个坐标点（x2，y2）旋转角度（a）后的新坐标


@param x1
被计算点横坐标
@param y1
被计算点纵坐标
@param x2
圆心横坐标
@param y2
圆心纵坐标
@param a
角度
@return （x3，y3）