cmpBinaryFixedPoint
Compares two BinaryFixedPoint values and returns -1, 0, or
1 depending on whether a is less than, equal to, or greater than b.
Only the kind and fractionalBits of the two operands must match;
signedness and totalBits are allowed to differ because they are
storage concerns only and do not affect the mathematical value being
compared. Mismatches on the constrained dimensions throw
SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH.
Type Parameters
| Type Parameter |
|---|
TFractionalBits extends number |
Parameters
| Parameter | Type |
|---|---|
a | BinaryFixedPoint<Signedness, number, TFractionalBits> |
b | BinaryFixedPoint<Signedness, number, NoInfer<TFractionalBits>> |
Returns
-1 | 0 | 1