ts-data-forge
    Preparing search index...
    Uint32: {
        add: (x: WithSmallInt, y: WithSmallInt) => Uint32;
        clamp: (x: number) => Uint32;
        div: (x: WithSmallInt, y: ToNonZeroIntWithSmallInt<Uint32>) => Uint32;
        is: (a: number) => a is Uint32;
        max: (...values: readonly WithSmallInt<Uint32, 40>[]) => Uint32;
        MAX_VALUE: number;
        min: (...values: readonly WithSmallInt<Uint32, 40>[]) => Uint32;
        MIN_VALUE: 0;
        mul: (x: WithSmallInt, y: WithSmallInt) => Uint32;
        pow: (x: WithSmallInt, y: WithSmallInt) => Uint32;
        random: (
            min?: WithSmallInt<Uint32, 40>,
            max?: WithSmallInt<Uint32, 40>,
        ) => Uint32;
        sub: (x: WithSmallInt, y: WithSmallInt) => Uint32;
    } = ...

    Utility functions for working with Uint32 (32-bit unsigned integer) branded types. Provides type-safe operations that ensure results remain within the valid range [0, 2^32). All arithmetic operations are clamped to maintain the Uint32 constraint.

    Type Declaration

    • add: (x: WithSmallInt, y: WithSmallInt) => Uint32

      Adds two Uint32 values, with result clamped to [0, 2^32).

    • clamp: (x: number) => Uint32

      Clamps a Uint32 to be within the specified range.

    • div: (x: WithSmallInt, y: ToNonZeroIntWithSmallInt<Uint32>) => Uint32

      Divides two Uint32 values using floor division, with result clamped to [0, 2^32).

    • is: (a: number) => a is Uint32

      Type guard that checks if a value is a 32-bit unsigned integer.

    • Readonlymax: (...values: readonly WithSmallInt<Uint32, 40>[]) => Uint32

      Returns the maximum of multiple Uint32 values.

    • ReadonlyMAX_VALUE: number

      The maximum value for a Uint32.

    • Readonlymin: (...values: readonly WithSmallInt<Uint32, 40>[]) => Uint32

      Returns the minimum of multiple Uint32 values.

    • ReadonlyMIN_VALUE: 0

      The minimum value for a Uint32.

    • mul: (x: WithSmallInt, y: WithSmallInt) => Uint32

      Multiplies two Uint32 values, with result clamped to [0, 2^32).

    • pow: (x: WithSmallInt, y: WithSmallInt) => Uint32

      Raises a Uint32 to a power, with result clamped to [0, 2^32).

    • random: (min?: WithSmallInt<Uint32, 40>, max?: WithSmallInt<Uint32, 40>) => Uint32

      Generates a random Uint32 value.

    • sub: (x: WithSmallInt, y: WithSmallInt) => Uint32

      Subtracts two Uint32 values, with result clamped to [0, 2^32).