isnan
Shared
Tells whether a value is the special number NaN (not a number).
bool isnan(any value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | any | The value. |
Returns
true if the value is a NaN number; false for anything else.
Example
local ratio = kills / deaths
if isnan(ratio) then
ratio = 0
end