/** * Gets the low 32 bits as a signed integer. * @returns {number} Signed low bits */ getLowBits() { return Number(BigInt.asIntN(32, this.value)) }
/** * @param {number} value * @returns {!Long} * @inner */ static fromInt(value) { if (isNaN(value)) return Long.ZERO return new Long(BigInt.asIntN(64, BigInt(value))) }
/** * Gets the high 32 bits as a signed integer. * @returns {number} Signed high bits */ getHighBits() { return Number(BigInt.asIntN(32, this.value >> BigInt(32))) }
/** * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. * @returns {number} */ toInt() { return Number(BigInt.asIntN(32, this.value)) }