This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* return the distance between two points. | |
* | |
* @param {number} x1 x position of first point | |
* @param {number} y1 y position of first point | |
* @param {number} x2 x position of second point | |
* @param {number} y2 y position of second point | |
* @return {number} distance between given points | |
*/ | |
Math.getDistance = function( x1, y1, x2, y2 ) { |