Constructorsconstructor new Long ( low : number , high ?: number , unsigned ?: boolean ) : Long Parameters low : number Optional
high : number Optional
unsigned : boolean Propertiesunsigned unsigned : boolean
Methodsadd add ( addend : string | number | Long ) : Long Parameters addend : string | number | Long and and ( other : string | number | Long ) : Long Parameters other : string | number | Long clz clz () : number Returns number comp comp ( other : string | number | Long ) : number Parameters other : string | number | Long Returns number compare compare ( other : string | number | Long ) : number Parameters other : string | number | Long Returns number count Leading Zeros countLeadingZeros () : number Returns number count Trailing Zeros countTrailingZeros () : number Returns number ctz ctz () : number Returns number div div ( divisor : string | number | Long ) : Long Parameters divisor : string | number | Long divide divide ( divisor : string | number | Long ) : Long Parameters divisor : string | number | Long eq eq ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean equals equals ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean eqz eqz () : boolean Returns boolean ge ge ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean get High Bits getHighBits () : number Returns number get High Bits Unsigned getHighBitsUnsigned () : number Returns number get Low Bits getLowBits () : number Returns number get Low Bits Unsigned getLowBitsUnsigned () : number Returns number get Num Bits Abs getNumBitsAbs () : number Returns number greater Than greaterThan ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean greater Than Or Equal greaterThanOrEqual ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean gt gt ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean gte gte ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean is Even isEven () : boolean Returns boolean is Negative isNegative () : boolean Returns boolean is Odd isOdd () : boolean Returns boolean is Positive isPositive () : boolean Returns boolean is Zero isZero () : boolean Returns boolean le le ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean less Than lessThan ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean less Than Or Equal lessThanOrEqual ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean lt lt ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean lte lte ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean mod mod ( other : string | number | Long ) : Long Parameters other : string | number | Long modulo modulo ( other : string | number | Long ) : Long Parameters other : string | number | Long mul mul ( multiplier : string | number | Long ) : Long Parameters multiplier : string | number | Long multiply multiply ( multiplier : string | number | Long ) : Long Parameters multiplier : string | number | Long ne ne ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean neq neq ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean not Equals notEquals ( other : string | number | Long ) : boolean Parameters other : string | number | Long Returns boolean or or ( other : string | number | Long ) : Long Parameters other : string | number | Long rem rem ( other : string | number | Long ) : Long Parameters other : string | number | Long rotate Left rotateLeft ( numBits : number | Long ) : Long rotate Right rotateRight ( numBits : number | Long ) : Long shift Right shiftRight ( numBits : number | Long ) : Long shift Right Unsigned shiftRightUnsigned ( numBits : number | Long ) : Long sub sub ( subtrahend : string | number | Long ) : Long Parameters subtrahend : string | number | Long subtract subtract ( subtrahend : string | number | Long ) : Long Parameters subtrahend : string | number | Long to Bytes toBytes ( le ?: boolean ) : number [] Returns number [] to BytesBE toBytesBE () : number [] Returns number [] to BytesLE toBytesLE () : number [] Returns number [] to Int toInt () : number Returns number to Number toNumber () : number Returns number to String toString ( radix ?: number ) : string Returns string xor xor ( other : string | number | Long ) : Long Parameters other : string | number | Long Static
from Bits fromBits ( lowBits : number , highBits : number , unsigned ?: boolean ) : Long Parameters lowBits : number highBits : number Optional
unsigned : boolean Static
from Bytes fromBytes ( bytes : number [] , unsigned ?: boolean , le ?: boolean ) : Long Parameters bytes : number [] Optional
unsigned : boolean Optional
le : boolean Static
from BytesBE fromBytesBE ( bytes : number [] , unsigned ?: boolean ) : Long Parameters bytes : number [] Optional
unsigned : boolean Static
from BytesLE fromBytesLE ( bytes : number [] , unsigned ?: boolean ) : Long Parameters bytes : number [] Optional
unsigned : boolean Static
from Int fromInt ( value : number , unsigned ?: boolean ) : Long Parameters value : number Optional
unsigned : boolean Static
from Number fromNumber ( value : number , unsigned ?: boolean ) : Long Parameters value : number Optional
unsigned : boolean Static
from String fromString ( str : string , unsigned ?: number | boolean , radix ?: number ) : Long Parameters str : string Optional
unsigned : number | boolean Optional
radix : number Static
from Value fromValue ( val : | string | number | Long | { high : number ; low : number ; unsigned : boolean } , unsigned ?: boolean , ) : Long Parameters val : string | number | Long | { high : number ; low : number ; unsigned : boolean } Optional
unsigned : boolean Static
is Long isLong ( obj : any ) : obj is Long Returns obj is Long
Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.