摘要:
function GetAngle(x1, y1, x2, y2) { var angle = Math.atan((y1 - y2) /(x1 - x2)) * 180 / Math.PI ; if (x1 < x2 && y1 < y2) {//象限1 angle = 90 - angle; } else if(x1 < x2 && y1 > y2) {//象限2 angle = Math.abs(angle) + 90; } else if(x1 > x2 && y1 > y2) {//象限3 angle 阅读全文