int32 function

int int32(
  1. int value
)

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;
}