UNPKG

igniteui-react-core

Version:
53 lines (52 loc) 1.87 kB
/* 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 { __extends } from "tslib"; import { Base, markType } from "./type"; /** * @hidden */ var PolygonUtil = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PolygonUtil, _super); function PolygonUtil() { return _super !== null && _super.apply(this, arguments) || this; } PolygonUtil.b = function (a, b) { if (a == null) { return false; } var c = a.count; if (c < 4) { return false; } var d = false; for (var 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; }; PolygonUtil.a = function (a, b) { if (a == null) { return false; } var c = a.length; if (c < 4) { return false; } var d = false; for (var 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 = markType(PolygonUtil, 'PolygonUtil'); return PolygonUtil; }(Base)); export { PolygonUtil };