三角函数
摘要:
//弧度=角度*Math.PI/180;//角度=弧度*180/Math.PI;var speed:Number = 5;addEventListener(Event.ENTER_FRAME,onEnterFrame);function onEnterFrame(event:Event):void{ var dx:Number = mouseX - ball.x; var dy:Number = mouseY - ball.y; var angle:Number = Math.atan2(dy,dx); var dist:Number = Math.sqrt(dx * dx + dy * dy 阅读全文