int32 function
Converts a value to a 32-bit signed integer.
This function takes an integer value, masks it to 32 bits, and then shifts it to ensure it is treated as a signed 32-bit integer.
param value
The integer value to be converted.
returns The 32-bit signed integer representation of the input value.
Implementation
int int32(int value) {
return (value & 0xFFFFFFFF) << 32 >> 32;
}