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

    Namespace providing type-safe arithmetic operations for 16-bit signed integers.

    All operations automatically clamp results to the valid Int16 range [-32768, 32767]. This ensures that all arithmetic maintains the 16-bit signed integer constraint.

    Type Declaration

    • abs: (x: WithSmallInt) => ToNonNegative<Int16>

      Returns the absolute value of a 16-bit signed integer.

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

      Adds two Int16 values.

    • clamp: (x: number) => Int16

      Clamps a number to the Int16 range.

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

      Divides one Int16 by another using floor division.

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

      Type guard to check if a value is an Int16.

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

      Returns the larger of two Int16 values.

    • ReadonlyMAX_VALUE: number

      The maximum value for a 16-bit signed integer.

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

      Returns the smaller of two Int16 values.

    • ReadonlyMIN_VALUE: number

      The minimum value for a 16-bit signed integer.

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

      Multiplies two Int16 values.

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

      Raises an Int16 to the power of another Int16.

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

      Generates a random Int16 value within the valid range.

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

      Subtracts one Int16 from another.