phaser/v3/merge/vec2/LengthSq.js
2017-08-08 17:16:23 +01:00

9 lines
102 B
JavaScript

export default function (a) {
let x = a[0];
let y = a[1];
return (x * x) + (y * y);
}