Returns the absolute value of a negative safe integer.
Adds two negative safe integers.
Clamps a number to the NegativeSafeInt range.
Type guard to check if a value is a NegativeSafeInt.
Readonlymax: (...values: readonly WithSmallInt<NegativeSafeInt>[]) => NegativeSafeIntReturns the larger of two negative safe integers.
ReadonlyMAX_VALUE: -1The maximum value for a negative safe integer.
Readonlymin: (...values: readonly WithSmallInt<NegativeSafeInt>[]) => NegativeSafeIntReturns the smaller of two negative safe integers.
ReadonlyMIN_VALUE: numberThe minimum value for a negative safe integer.
Raises a negative safe integer to the power of another negative safe integer.
Generates a random NegativeSafeInt value within the valid range.
Subtracts one negative safe integer from another.
The mathematical result can be positive, so it is clamped to the
NegativeSafeInt range (maximum -1).
Namespace providing type-safe arithmetic operations for negative safe integers.
NegativeSafeInt represents safe integers that are strictly less than zero (
[Number.MIN_SAFE_INTEGER, -1]). Operations that stay within the negative safe integers clamp their results to the valid range, while operations whose result leaves the set (mul,div,abs) are typed to reflect the actual sign of the result.