phaser/wip/vec2/Length.js

10 lines
113 B
JavaScript
Raw Normal View History

2017-02-04 04:41:17 +00:00
export default function (a) {
let x = a[0];
let y = a[1];
return Math.sqrt((x * x) + (y * y));
}