import { CheckWithinSteppedBoundsResult } from "./check-within-stepped-bounds-result";
import { CheckPrecisionAndScaleResult } from "./check-precision-and-scale-result";
export declare class NumberUtils {
    static ParseIntNumberInput(arg: any): number;
    static ParseInt(arg: any): number;
    static ParseFloatNumberInput(arg: any, decimalPrecision?: number): number;
    static ParseFloatNumberInputKeepPrecision(arg: any): number;
    /**
     * Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
     *
     * @param {any} arg The argument to parse to a float
     * @param {number} decimalPrecision The number of decimals, or the precision, the parsed return float should have
     * @returns {number} NaN if not possible, else the parsed float value
     */
    static ParseFloat(arg: any, decimalPrecision?: number): number;
    /**
     * Returns given arg as a float number with given decimal precision, if possible. Returns NaN if parse conversion failed.
     *
     * @param arg The argument to parse to a float
     * @returns {number} The argument as a float with its original decimal precision intact
     */
    static ParseFloatKeepPrecision(arg: any): number;
    /**
     * Returns the given argument as a number. Returns given defaultValue if conversion of argument was impossible.
     * @param arg
     * @param {number} [defaultValue = 0]
     * @returns {number}
     */
    static ParseNumberOrDefault(arg: any, defaultValue?: number): number;
    static IsInteger(arg: any): boolean;
    static GetDecimalPlaces(arg: any, maxAnswer?: number): number;
    static ParseNumberInputOrDefault(numberInput: any, defaultValue?: number): number;
    static IsNumber(arg: any): boolean;
    /**
     * Returns whether given arg is indeed not a number (it's NaN or it has another type than 'number')
     * Our exact copy of AS Flex'es isNaN(arg) function. Always use this method for copying Flex isNaN(..) occurences into TypeScript.
     * @param arg
     * @returns {boolean}
     * @constructor
     */
    static IsNaN(arg: any): boolean;
    static NaN(number: any, substitute?: number): number;
    static IsParsableNumber(arg: any): boolean;
    static IsParsableNumberInput(numberInput: any): boolean;
    /**
     * Returns whether given arg is parseable as a number, and whether the lengts of its number parse result is equal to its original length.
     * I.e. this function returns FALSE with given number-parsable strings, but that have non-numeric appendices, eg '2233ff'. That arg
     * IS number-parseable, but not a strict 'string number', the latter being what this method actually checks for.
     */
    static IsStringNumber(arg: string): boolean;
    static IsListOfNumbers(arg: string, separator?: string): boolean;
    static ParseStringNumber(arg: string): number;
    static ParseStringNumberDefault(arg: string | any, defaultValue?: number): number;
    /**
     * Returns a random integer in range [lowerBound .. upperBound], an inclusive range. Returns NaN if not possible.
     * Given bounds are truncated first, before serving as the true lower- and upper bounds for the random int.
     */
    static RandomInt(lowerBoundInt: number, upperBoundInt: number): number;
    static AddThousandsCommasTo(value: any): string;
    /**
     * Function used to check wether a given number is composed of another number, power-of-two wise.
     * Example usage: NumberUtils.NumIsComposedOf(articleListObject.publication, ArticlePublication.Selector).
     * This would return whether or not that articleListObject was publicated for selector or not, where articleListObject.publication
     * was possibly a 'COMPOSITE that was made out of (including)' ArticlePublication.Selector.
     */
    static NumIsComposedOfOtherPowTwoNum(bigNrToCheck: number, powTwoNumItShouldBeComposedOf: number): boolean;
    /**
     * Returns given nr, or the given default number (default 0) if the nr number was undefined or otherwise not a number.
     * Same as CoMath.NaN from AS code (used as its substitute in transaction logic)
     * @param nr
     * @param defaultNr
     * @returns {number}
     */
    static NrOrDefault(nr: number, defaultNr?: number): number;
    /**
     * Returns whether given nrToCheck is within the given precision and scale limits. Precision and scale, here, are Oracle DB terms.
     * This function can thus be used to check whether the given number is safe to send to the 'database' beforehand, if we know the
     * precision and scale of the number in the db declaration.
     *
     * I.e. A number declared in the Oracle DB as number(5, 2) has a precision of 5 and a scale of 2.
     *
     * @param {number} nrToCheck
     * @param {number} precision The number of significant digits, including possibly negative scale. E.g. 3 in '123' and 5 in '51.123'
     * @param {number} [scale = 0] The number of significant digits AFTER the decimal point. E.g. 1 in 5432.1 and 3 in 54000.003
     * @returns {CheckPrecisionAndScaleResult} Whether given nrToCheck is ok for given precision and scale, and if not, the
     * nearest number that IS ok for those constraints.
     */
    static CheckPrecisionAndScale(nrToCheck: number, precision: number, scale?: number): CheckPrecisionAndScaleResult;
    /**
     * Returns whether given x is OK within the given min, max and step boundaries, where it should hold that nrToCheck = min + N * step,
     * with N integer or 0.
     * @param {number} nrToCheck Number to check whether it's within the given bounds
     * @param min Inclusive
     * @param max Inclusive
     * @param stepSize
     * @returns {CheckWithinSteppedBounds} Returns remainder of undefined when nrToCheck was OUTSIDE [min, max], else full result object.
     */
    static CheckWithinSteppedBounds(nrToCheck: number, min: number, max: number, stepSize?: number): CheckWithinSteppedBoundsResult;
    /**
     * Finds the number closest to the originalNumber, that adheres to the given bounds. That is, for which it holds that
     * nr = min + N * step with N integer or 0.
     * @param {number} originalNr Find closest answer to this number
     * @param min Inclusive
     * @param max Inclusive
     * @param stepSize
     * @returns {boolean} The closest OK number for bounds.
     */
    static GetNearestNumberWithinSteppedBounds(originalNr: number, min: number, max: number, stepSize?: number): number;
    /**
     * Returns the true maximum allowed value for the given "stepped bounds": min, stepSize and max, for which it holds that each allowed
     * value Y = min + stepSize * N, for any INTEGER or 0 N where it also holds, of course, that Y <= max.
     * @param min
     * @param max
     * @param stepSize
     */
    static GetTrueSteppedBoundsMax(min: number, max: number, stepSize?: number): number;
    static GetNearestNumberWithinBounds(originalNr: number, min: number, max: number): number;
    static ToString(nr: number): string;
    static DecimalsToStepIncrement(numberOfDecimals: number): number;
    static Round(value: number, decimals: number): number;
    static PrecisionScaleToMaxValue(precision: number, scale: number): number;
    static DifferenceBetweenNumbers(numberA: number, numberB: number): number;
    private static _GetLargestDecimalPrecisionOf;
    private static _NumberInputToNumberStr;
}
