Class to hold a 64-bit integer. Javascript does not support such numbers so internally we use two number fields to hold the high and low bits.

Hierarchy

  • Int64

Constructors

Accessors

  • get highBytes(): number
  • Gets the high bytes of this Int64 object.

    Returns

    The high bytes.

    Returns number

  • get lowBytes(): number
  • Gets the low bytes of this Int64 object.

    Returns

    The low bytes.

    Returns number

Methods

  • The comparison is done by converting both this object and the other into plain javascript numbers and then comparing these values

    Parameters

    Returns number

  • Checks if this Int64 object is equal to another Int64 object or number.

    Returns

    True if equal, false otherwise.

    Parameters

    • other: number | Int64

      The other Int64 object or number.

    Returns boolean

  • Converts this Int64 object to a bigint.

    Returns

    The resulting bigint.

    Returns bigint

  • Converts this Int64 object to a debug string.

    Returns

    The debug string.

    Returns string

  • Converts this Int64 object to a plain javascript number. Not all values can be converted.

    Returns

    The resulting number.

    Returns number

  • Converts this Int64 object to a SimpleInt64 object.

    Returns

    The resulting SimpleInt64 object.

    Returns SimpleInt64

  • Creates a new Int64 from a bigint.

    Returns

    The resulting Int64 object.

    Parameters

    • input: bigint

      The bigint.

    Returns Int64

  • Create a new Int64 from two numbers.

    Returns

    The resulting Int64 object.

    Parameters

    • hiBytes: number

      A Int32 holding the high bytes.

    • lowbytes: number

      A Int32 holding the low bytes.

    Returns Int64

  • Creates a new Int64 from a javascript number.

    Returns

    The resulting Int64 object.

    Parameters

    • input: number

      A javascript number that then is broken in high and low bytes.

    Returns Int64

  • Creates a new Int64 from a SimpleInt64 object.

    Returns

    The resulting Int64 object.

    Parameters

    Returns Int64

  • Converts an array of SimpleInt64 objects to an array of Int64 objects.

    Returns

    The resulting array of Int64 objects.

    Parameters

    • input: SimpleInt64[]

      The array of SimpleInt64 objects.

    Returns Int64[]

  • Converts a number or Int64 object to an Int64 object.

    Returns

    The resulting Int64 object.

    Parameters

    • n: number | Int64

      The number or Int64 object.

    Returns Int64

  • Converts an array of Int64 objects to an array of SimpleInt64 objects.

    Returns

    The resulting array of SimpleInt64 objects.

    Parameters

    • input: Int64[]

      The array of Int64 objects.

    Returns SimpleInt64[]