Posted By

sgarcez on 08/06/08


Tagged

textmate 1


Versions (?)

Get Distance


 / Published in: Other
 

  1. private function getDist(x1:Number, y1:Number, x2:Number, y2:Number):Number
  2. {
  3. var dx:Number = x2 - x1;
  4. var dy:Number = y2 - y1;
  5. return Math.sqrt(dx*dx + dy*dy);
  6. }

Report this snippet  

You need to login to post a comment.