Returns the absolute value of a negative integer.
Adds two negative integers.
Clamps a number to the negative integer range.
Type guard to check if a value is a NegativeInt.
Readonlymax: (...values: readonly WithSmallInt<NegativeInt>[]) => NegativeIntReturns the larger of two negative integers.
ReadonlyMAX_VALUE: -1The maximum value for a negative integer.
Readonlymin: (...values: readonly WithSmallInt<NegativeInt>[]) => NegativeIntReturns the smaller of two negative integers.
Raises a negative integer to the power of another negative integer.
Generates a random NegativeInt value within the valid range.
Subtracts one negative integer from another.
The mathematical result can be positive, so it is clamped to the negative
integer range (maximum -1).
Namespace providing type-safe arithmetic operations for negative integers.
NegativeInt represents integers that are strictly less than zero (
<= -1). Operations that stay within the negative integers (such asadd) 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.