Skip to content

Instantly share code, notes, and snippets.

@ikeryou

ikeryou/distance.js

Last active Sep 1, 2016
Embed
What would you like to do?
2点間の距離
var dx:Number = x2 - x1;
var dy:Number = y2 - y1;
var dist:Number = Math.sqrt(dx * dx + dy * dy);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment