Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Integer

Ponyfill for Java's Integer class.

Hierarchy

  • Integer

Index

Properties

Static MAX_VALUE

MAX_VALUE: number = Number.MAX_SAFE_INTEGER

Static MIN_VALUE_32_BITS

MIN_VALUE_32_BITS: number = -2147483648

Methods

Static bitCount

  • bitCount(i: number): number

Static numberOfLeadingZeros

  • numberOfLeadingZeros(i: number): number

Static numberOfTrailingZeros

  • numberOfTrailingZeros(i: number): number

Static parseInt

  • parseInt(num: string, radix?: number): number
  • Converts A string to an integer.

    Parameters

    • num: string
    • Default value radix: number = undefined

      A value between 2 and 36 that specifies the base of the number in numString. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.

    Returns number

Static toBinaryString

  • toBinaryString(intNumber: number): string

Static toHexString

  • toHexString(i: number): string

Static truncDivision

  • truncDivision(dividend: number, divisor: number): number

Generated using TypeDoc