在画面上计算四象限射击角度
在画面上计算四象限射击角度,用手点击不同的射机角度进行改变publicfloatgetAngle(floatpx1,floatpy1){float_pointX=px1-originX;float_pointY=py1-originY;floatsin=(float)Math.sqrt(Math.pow(_pointY,2))/(float)Math.sqrt(Math.pow(_pointX,2)+Math.pow(_pointY,2));//floattan=(_pointY-originY)/(_pointX-originX);angl
下载地址
用户评论
不错,实现了我要的效果