Files
il/resources/public/js/cljs-runtime/module$node_modules$pixi_DOT_js$lib$maths$point$pointInTriangle.js
2026-07-01 22:38:29 -06:00

22 lines
676 B
JavaScript

shadow$provide.module$node_modules$pixi_DOT_js$lib$maths$point$pointInTriangle = function(global, require, module, exports) {
exports.pointInTriangle = function(px, py, x1, y1, x2, y2, x3, y3) {
x3 -= x1;
y3 -= y1;
x2 -= x1;
y2 -= y1;
px -= x1;
x1 = py - y1;
py = x3 * x3 + y3 * y3;
y1 = x3 * x2 + y3 * y2;
x3 = x3 * px + y3 * x1;
y3 = x2 * x2 + y2 * y2;
x2 = x2 * px + y2 * x1;
y2 = 1 / (py * y3 - y1 * y1);
y3 = (y3 * x3 - y1 * x2) * y2;
x3 = (py * x2 - y1 * x3) * y2;
return 0 <= y3 && 0 <= x3 && 1 > y3 + x3;
};
};
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$maths$point$pointInTriangle.js.map