phaser/wip/vec2/Length.js
2018-01-09 22:12:16 +00: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));
}