igniteui-react-core
Version:
Ignite UI React Core.
49 lines (48 loc) • 1.8 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, markType } from "./type";
/**
* @hidden
*/
export let PolygonUtil = /*@__PURE__*/ (() => {
class PolygonUtil extends Base {
static b(a, b) {
if (a == null) {
return false;
}
let c = a.count;
if (c < 4) {
return false;
}
let d = false;
for (let e = 0, f = c - 1; e < c; f = e++) {
if (((a.item(e).y > b.y) != (a.item(f).y > b.y)) && (b.x < (a.item(f).x - a.item(e).x) * (b.y - a.item(e).y) / (a.item(f).y - a.item(e).y) + a.item(e).x)) {
d = !d;
}
}
return d;
}
static a(a, b) {
if (a == null) {
return false;
}
let c = a.length;
if (c < 4) {
return false;
}
let d = false;
for (let e = 0, f = c - 1; e < c; f = e++) {
if (((a[e].y > b.y) != (a[f].y > b.y)) && (b.x < (a[f].x - a[e].x) * (b.y - a[e].y) / (a[f].y - a[e].y) + a[e].x)) {
d = !d;
}
}
return d;
}
}
PolygonUtil.$t = /*@__PURE__*/ markType(PolygonUtil, 'PolygonUtil');
return PolygonUtil;
})();