UNPKG

@phaserjs/phaser

Version:
4 lines (3 loc) 129 B
export function GetVec2DistancePower(a, b, pow = 2) { return Math.sqrt(Math.pow(b.x - a.x, pow) + Math.pow(b.y - a.y, pow)); }