why does the To Boolean (Integer) node convert everything except 0 to the truth?
Hey @228Arseniy228!
This is due to the Boolean’s nature, it can only be True or False- On or Off- Anything above 0 or 0.
Hope that helps!
2 Likes
It is pure speculation but I think it’s a legacy thing. In the beginning (don’t look at me like that - I’m not a historian) 0 and 1 were used instead of “true” and “false”.
In terms of binary representation only 0 has all bits set to 0. Any other number (negative or positive) has at least one non-zero bit in binary, so there’s that.
2 Likes
I’m curious what you’re expecting. What should “10” evaluate to, if not “true?”
1 Like
true
false
mayhap
, everybody knows that.
1 Like