@nevware21/ts-utils
    Preparing search index...

    Function mathToInt

    • Convert the provided value to an integer, like the ECMAScript ToIntegerOrInfinity(): the value is converted to a number (once), NaN is 0, a fraction is truncated, and -0 (or a value between -1 and 0) is 0 (since 0.20.0, it was -0)

      Parameters

      • value: any

        The value to be converted to an integer.

      • OptionalthrowInfinity: boolean

        [Optional] Throws RangeError if value is Infinity, defaults to false

      Returns number

      The value converted to an integer