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

9 lines
165 B
JavaScript

export default function (a, b, precision = 1e-6) {
return (
Math.abs(a[0] - b[0]) <= precision &&
Math.abs(a[1] - b[1]) <= precision
);
}