Get the rotation angle in degree from a direction

0 Flares Twitter 0 Facebook 0 Google+ 0 Email -- Filament.io 0 Flares ×

[sourcecode language=’cpp’]var dx:Number = x1 – x2;
var dy:Number = y1 – y2;

rotation = Math.atan2( dy , dx ) * ( 180 / 3.141592653589793 ) ;[/sourcecode]

0 Flares Twitter 0 Facebook 0 Google+ 0 Email -- Filament.io 0 Flares ×

Leave a Comment

*