toInt16 (Function)

Signature: toInt16(value: t0) -> int16

Description: Converts any integer type to int16. A value outside -32768..32767 performs Arith.overflow with the source as its operand.

Parameters

  • value (t0): The integer to convert

Returns: int16

Example

print(toInt16(1000))  // 1000
print (toInt16 1000)  // 1000