UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

120 lines (119 loc) 3.53 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 { Base, markType } from "./type"; import { isNaN_, isInfinity } from "./number"; /** * @hidden */ export let MathUtil = /*@__PURE__*/ (() => { class MathUtil extends Base { static c(a) { return Math.log(a + Math.sqrt(a * a + 1)); } static a(a, b) { if (Math.abs(a - b) < 1E-05) { return true; } return false; } static t(number_) { return number_.toString(); } static h(a, b) { return Math.sqrt(a * a + b * b); } static q(a) { return a * a; } static b(a) { return !isNaN_(a) && !isInfinity(a); } static e(a, b, c) { return Math.min(c, Math.max(b, a)); } static p(a) { return Math.PI * a / 180; } static g(a) { return 180 * a / Math.PI; } static m(a, b, c) { return Math.min(a, Math.min(b, c)); } static j(a, b, c) { return Math.max(a, Math.max(b, c)); } static l(...a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.min(b, a[c]); } return b; } static n(a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.min(b, a[c]); } return b; } static i(...a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.max(b, a[c]); } return b; } static k(a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.max(b, a[c]); } return b; } static s(a) { if (a.length == 0) { return 0; } let b = 0; for (let d = 0; d < a.length; d++) { let c = a[d]; if (isNaN_(c)) { continue; } if (isInfinity(c)) { continue; } b += c; } return b; } static d(a) { if (a.length == 0) { return 0; } let b = 0; let c = 0; for (let e = 0; e < a.length; e++) { let d = a[e]; if (isNaN_(d)) { continue; } if (isInfinity(d)) { continue; } b += d; c++; } return b / c; } } MathUtil.$t = markType(MathUtil, 'MathUtil'); MathUtil.o = (1 + Math.sqrt(5)) / 2; MathUtil.r = Math.sqrt(2); return MathUtil; })();