/// <reference path="./sigApi.PropertyWithDataPoints.d.ts" />

declare namespace SigApi {
    interface PropertyUnit extends PropertyWithDataPoints {
        /**
         * Formats (unit conversion and format) the given value
         * 
         * @param {number} value The number which should be converted
         * @param {boolean} [isFloatingPoint=true] A flag if the value should be treated a float of as an integer (integer uses the decimalDigits as divisor)
         * @param {boolean} [indicateOverflow=true] A flag which specifies if values which are greater then the maxDigits should be displayed as <<< (= true) or as the max Number (= false & correct Round Type)
         * @param {number} [roundType=SIG_CONST.ROUND_ROUND] Specifies how values are round (0 = normalRound, 1 = ceil, 2 = floor)
         * 
         * @returns {number|string} The formated value
         */
        formatValue(
            value: number,
            isFloatingPoint?: boolean,
            indicateOverflow?: boolean,
            roundType?: number
        ): number | string,
        /**
         * Converts (unit conversion) the given value
         * 
         * @param {number} value The number which should be converted
         * @param {boolean} [isFloatingPoint=true] A flag if the value should be treated a float of as an integer (integer uses the decimalDigits as divisor)
         * 
         * @returns {number} The converted value
         */
        convertValue(value: number, isFloatingPoint?: boolean): number
        /**
         * Converts (unit back-conversion) the given value back
         * 
         * @param {number} value The number which should be converted
         * @param {boolean} [isFloatingPoint=true] A flag if the value should be treated a float of as an integer (integer uses the decimalDigits as divisor)
         * 
         * @returns {number} The converted value
         */
        convertValueBack(value: number, isFloatingPoint?: boolean): number
    }
}
