Issue Description
Expected Behavior
It should say that tonumber() does not guarantee a valid number as the outcome (since NaN is simply not a number).
Actual Behavior
tonumber(“nan”) produces nan value, which causes a lot of issues if someone relies on that behavior and does not implement appropriate checks (as very comparison with NaN produces false).
tonumber(“nan(snan)”) → nan(snan)
tonumber(“nan(ind)”) → -nan(ind)
Workaround
Double-check the statements with tonumber in your games and make sure they’re not subject to this issue.
Issue Area: DevHub Content
Page URL: Strings & Lua Globals