0.0 was intentionally left out. Floats are not to be used as boolean values. It also underlines the fact that floats are not ints. Originally, the integer zero was supposed to be the only false value.
With a float, is there even a precise way to determine weather a value is zero or not?
/ Fredrik (Naranek) Hubinette (Real Build Master)
Previous text:
2003-09-15 20:15: Subject: float type weirdness
Pike considers these things false:
o The integer zero (with arbitrary subtype). o Destructed objects and functions in destructed objects. o Objects with a `! that returns true.
I don't know whether 0.0 is intentionally left out or not. It's such an odd case I suspect it simply wasn't considered.
From a design viewpoint I don't like that the integer 0 is false to begin with, but now when it is it's not unreasonable that 0.0 should be false too.
/ Martin Stjernholm, Roxen IS