phaser/v3/src/math/distance/DistanceSquared.js

10 lines
163 B
JavaScript
Raw Normal View History

var DistanceSquared = function (x1, y1, x2, y2)
{
var dx = x1 - x2;
var dy = y1 - y2;
return dx * dx + dy * dy;
};
module.exports = DistanceSquared;