UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

46 lines (45 loc) 1.84 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, Point_$type, markType } from "./type"; import { LineEquation } from "./LineEquation"; /** * @hidden */ var Compute = /** @class */ /*@__PURE__*/ (function (_super) { __extends(Compute, _super); function Compute() { return _super !== null && _super.apply(this, arguments) || this; } Compute.b = function (a, b, c, d) { return Compute.a(new LineEquation(1, a, b), new LineEquation(1, c, d)); }; Compute.a = function (a, b) { var c = { $type: Point_$type, x: NaN, y: NaN }; if (a.a && b.a) { return c; } if (a.a || b.a) { var d = b.a ? b : a; var e = b.a ? a : b; var f = (d.g.x - e.g.x) * (e.f.y - e.g.y) / (e.f.x - e.g.x) + e.g.y; var g = a.a ? a.g.x : b.g.x; return { $type: Point_$type, x: g, y: f }; } var h = a.b * b.c - b.b * a.c; var i = Math.abs(h - 0) > 9.9999997473787516E-05; if (i) { var j = (b.c * a.d - a.c * b.d) / h; var k = (a.b * b.d - b.b * a.d) / h; c = { $type: Point_$type, x: j, y: k }; } return c; }; Compute.$t = markType(Compute, 'Compute'); return Compute; }(Base)); export { Compute };