float

From NWN Lexicon
Jump to navigationJump to search

A 32-bit floating point number. Maximum 3.402823e38, minimum -3.402823e38, default 0.0. Note that when initializing or setting a literal value to a float, you must include a decimal point and at least one number after the decimal. At your option, you may add a lower case "f" after the number, but this is a readability convenience and has no effect on script operation.

The vector type is made up of 3 floating point values.

This can be also used with the const keyword to effectively make it read-only and optimal for replacing magic numbers.


Example

float fExample  = 20.0;
float fCurrency = 19.99f;


See Also