Constructors
constructor
- new Q(val: bigint, base: number | bigint): Q
-
Parameters
-
val: bigint
-
base: number | bigint
Returns Q
Properties
Private
Readonly
_base
_base: bigint
Private
Readonly
_val
_val: bigint
Methods
Private
_bigintToHex
- _bigintToHex(val: bigint): string
-
Returns string
Private
_checkBase
- _checkBase(n: Q): void
-
Returns void
Private
_roundDown
- _roundDown(n: bigint): bigint
-
Returns bigint
Private
_roundUp
- _roundUp(n: bigint): bigint
-
Returns bigint
ceil
- ceil(): bigint
-
Returns bigint
eq
- eq(n: Q): boolean
-
Returns boolean
floor
- floor(): bigint
-
Returns bigint
gt
- gt(n: Q): boolean
-
Returns boolean
gte
- gte(n: Q): boolean
-
Returns boolean
lt
- lt(n: Q): boolean
-
Returns boolean
lte
- lte(n: Q): boolean
-
Returns boolean
toBuffer
- toBuffer(): Buffer
-
Returns Buffer
Static
fromValue
- fromValue(val: number | bigint | Buffer | Q, base: number | bigint): Q
-
Parameters
-
val: number | bigint | Buffer | Q
-
base: number | bigint
Returns Q