UNPKG

igniteui-react-core

Version:
126 lines (125 loc) 3.54 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"; import { isNaN_, isInfinity } from "./number"; /** * @hidden */ var MathUtil = /** @class */ /*@__PURE__*/ (function (_super) { __extends(MathUtil, _super); function MathUtil() { return _super !== null && _super.apply(this, arguments) || this; } MathUtil.b = function (a) { return Math.log(a + Math.sqrt(a * a + 1)); }; MathUtil.s = function (number_) { return number_.toString(); }; MathUtil.g = function (a, b) { return Math.sqrt(a * a + b * b); }; MathUtil.p = function (a) { return a * a; }; MathUtil.a = function (a) { return !isNaN_(a) && !isInfinity(a); }; MathUtil.d = function (a, b, c) { return Math.min(c, Math.max(b, a)); }; MathUtil.o = function (a) { return Math.PI * a / 180; }; MathUtil.f = function (a) { return 180 * a / Math.PI; }; MathUtil.l = function (a, b, c) { return Math.min(a, Math.min(b, c)); }; MathUtil.i = function (a, b, c) { return Math.max(a, Math.max(b, c)); }; MathUtil.k = function () { var a = []; for (var _i = 0; _i < arguments.length; _i++) { a[_i] = arguments[_i]; } var b = a[0]; for (var c = 1; c < a.length; ++c) { b = Math.min(b, a[c]); } return b; }; MathUtil.m = function (a) { var b = a[0]; for (var c = 1; c < a.length; ++c) { b = Math.min(b, a[c]); } return b; }; MathUtil.h = function () { var a = []; for (var _i = 0; _i < arguments.length; _i++) { a[_i] = arguments[_i]; } var b = a[0]; for (var c = 1; c < a.length; ++c) { b = Math.max(b, a[c]); } return b; }; MathUtil.j = function (a) { var b = a[0]; for (var c = 1; c < a.length; ++c) { b = Math.max(b, a[c]); } return b; }; MathUtil.r = function (a) { if (a.length == 0) { return 0; } var b = 0; for (var d = 0; d < a.length; d++) { var c = a[d]; if (isNaN_(c)) { continue; } if (isInfinity(c)) { continue; } b += c; } return b; }; MathUtil.c = function (a) { if (a.length == 0) { return 0; } var b = 0; var c = 0; for (var e = 0; e < a.length; e++) { var d = a[e]; if (isNaN_(d)) { continue; } if (isInfinity(d)) { continue; } b += d; c++; } return b / c; }; MathUtil.$t = markType(MathUtil, 'MathUtil'); MathUtil.n = (1 + Math.sqrt(5)) / 2; MathUtil.q = Math.sqrt(2); return MathUtil; }(Base)); export { MathUtil };