UNPKG

igniteui-react-core

Version:
114 lines (113 loc) 3.3 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 b(a) { return Math.log(a + Math.sqrt(a * a + 1)); } static s(number_) { return number_.toString(); } static g(a, b) { return Math.sqrt(a * a + b * b); } static p(a) { return a * a; } static a(a) { return !isNaN_(a) && !isInfinity(a); } static d(a, b, c) { return Math.min(c, Math.max(b, a)); } static o(a) { return Math.PI * a / 180; } static f(a) { return 180 * a / Math.PI; } static l(a, b, c) { return Math.min(a, Math.min(b, c)); } static i(a, b, c) { return Math.max(a, Math.max(b, c)); } static k(...a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.min(b, a[c]); } return b; } static m(a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.min(b, a[c]); } return b; } static h(...a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.max(b, a[c]); } return b; } static j(a) { let b = a[0]; for (let c = 1; c < a.length; ++c) { b = Math.max(b, a[c]); } return b; } static r(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 c(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 = /*@__PURE__*/ markType(MathUtil, 'MathUtil'); MathUtil.n = (1 + /*@__PURE__*/ Math.sqrt(5)) / 2; MathUtil.q = /*@__PURE__*/ Math.sqrt(2); return MathUtil; })();