After testing not a number (NaN) floats I found out that their boolean implicit conversion and or comparator operations are maybe not covered or bugged. Comparisons of nan to itself are correct, but to NaN vs real numbers fail as seen below.
float nan = "nan".ToFloat(); Print(nan); Print("nan == nan: " + (nan == nan)); Print("nan != nan: " + (nan != nan)); Print("nan == 0: " + (nan == 0)); Print("nan != 0: " + (nan != 0)); Print("nan == 1337: " + (nan == 1337)); Print("nan != 1337: " + (nan != 1337)); Print("nan == -42: " + (nan == -42)); Print("nan != -42: " + (nan != -42));
SCRIPT : float nan = nan SCRIPT : nan == nan: 1 SCRIPT : nan != nan: 0 SCRIPT : nan == 0: 1 //should be false SCRIPT : nan != 0: 0 // should be true SCRIPT : nan == 1337: 1 // should be false SCRIPT : nan != 1337: 0 //should be true SCRIPT : nan == -42: 1 //should be false SCRIPT : nan != -42: 0 // should be true