Garry's Mod Wiki

bit.tobit

  number bit.tobit( number value )

Description

Normalizes the specified value and clamps it in the range of a signed 32bit integer.

Arguments

1 number value
The value to be normalized.

Returns

1 number
The 32 bits of the provided value.

Example

print( bit.tobit( 9999999999 ) )
Output: 1410065407

Visual explanation:

January20-1021-gmod.png