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

9 lines
113 B
JavaScript

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