Readonlyadd: (Adds two non-zero integers, returning a + b as a NonZeroUint32.
ReadonlyfromNumber: (x: number) => PositiveUint32Converts an arbitrary number into a NonZeroUint32, rounding to the
nearest integer and saturating the result into the range [MIN_VALUE, MAX_VALUE].
Unlike asNonZeroUint32, this is total: out-of-range inputs are clamped to
the nearest representable NonZeroUint32 instead of throwing.
Readonlyis: (a: number) => a is PositiveUint32Type guard that checks if a value is a non-zero integer in [1, 2^32).
isNonZeroUint32 for usage examples
Readonlymax: (...values: readonly WithSmallInt<PositiveUint32, 40>[]) => PositiveUint32Returns the largest of the given non-zero integers.
ReadonlyMAX_VALUE: numberThe largest value representable as NonZeroUint32 (the upper saturation
target of fromNumber).
Readonlymin: (...values: readonly WithSmallInt<PositiveUint32, 40>[]) => PositiveUint32Returns the smallest of the given non-zero integers.
ReadonlyMIN_VALUE: 1The smallest value representable as NonZeroUint32 (the lower saturation
target of fromNumber).
Readonlymul: (Multiplies two non-zero integers, returning a * b as a NonZeroUint32.
Readonlypow: (Raises a to the power b, returning a ** b as a NonZeroUint32
(floored to an integer).
Readonlyrandom: (Generates a random NonZeroUint32 within the given range.
The range is inclusive on both ends.
Namespace providing type-safe operations for the
NonZeroUint32branded type.The
NonZeroUint32type represents a non-zero integer in [1, 2^32). Division (div) uses floor division.