Variable natSafeMathConst
natSafeMath: {
add: NatOp;
bankersDivide: NatOp;
ceilDivide: NatOp;
floorDivide: NatOp;
isGTE: ((x: number | bigint, y: number | bigint) => boolean);
multiply: NatOp;
subtract: NatOp;
} = ...
Type declaration
add: NatOp
bankersDivide: NatOp
ceilDivide: NatOp
floorDivide: NatOp
isGTE: ((x: number | bigint, y: number | bigint) => boolean)
- (x, y): boolean
Parameters
- x: number | bigint
- y: number | bigint
Returns boolean
multiply: NatOp
subtract: NatOp
These operations should be used for calculations with the values of basic fungible tokens.
natSafeMath is designed to be used directly, and so it needs to validate the inputs, as well as the outputs when necessary.