nwn

The IntToFloat() NWScript command converts an integer to a floating point number.

Definition

float IntToFloat (int nInteger)

int nInteger
The integer that will be converted to a floating point number.

This command is not always needed, as the Toolset's script compiler will automatically convert integers to floats when needed. However, there are instances when an explicit conversion is necessary, such as when one desires the division of integers to produce a fraction.

See also