/*
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 a(a) {
            return Math.log(a + Math.sqrt(a * a + 1));
        }
        static r(number_) {
            return number_.toString();
        }
        static f(a, b) {
            return Math.sqrt(a * a + b * b);
        }
        static o(a) {
            return a * a;
        }
        static c(a, b, c) {
            return Math.min(c, Math.max(b, a));
        }
        static n(a) {
            return Math.PI * a / 180;
        }
        static e(a) {
            return 180 * a / Math.PI;
        }
        static k(a, b, c) {
            return Math.min(a, Math.min(b, c));
        }
        static h(a, b, c) {
            return Math.max(a, Math.max(b, c));
        }
        static j(...a) {
            let b = a[0];
            for (let c = 1; c < a.length; ++c) {
                b = Math.min(b, a[c]);
            }
            return b;
        }
        static l(a) {
            let b = a[0];
            for (let c = 1; c < a.length; ++c) {
                b = Math.min(b, a[c]);
            }
            return b;
        }
        static g(...a) {
            let b = a[0];
            for (let c = 1; c < a.length; ++c) {
                b = Math.max(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 q(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 b(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.m = (1 + Math.sqrt(5)) / 2;
    MathUtil.p = Math.sqrt(2);
    return MathUtil;
})();
