Actionscript distance


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import flash.geom.Point;
  2.  
  3. private function dist( toX:Number, toY:Number, fromX:Number, fromY:Number ) : Number {
  4. return Point.distance( new Point( toX, toY ), new Point( fromX, fromY ) );
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.