Good day to you,
Is it always guaranteed that when converting :
float to bool
0.0f is false
1.0f is true
bool to float
false is 0.0f
true is 1.0f
negating the bool
!false is 1.0f
!true is 0.0f
negating the float
!1.0f is false
!0.0f is true
Thank you much,
Dennis

float to bool, bool to float conversion
Rajnish
According to the C++ Standard, paragraph 4.12.1
An rvalue of arithmetic, enumeration, pointer, or pointer to member type can be converted to an rvalue of type bool. A zero value, null pointer value, or null member pointer value is converted to false; any other value is converted to true.
Babba72
It's definately always the case that anything this is zero equates to false, and vice versa ( not sure if a float gets rounded for this, but 1.0 is always true ). I would say that true or not, setting the value of a float from a boolean implicitly is somewhat of a hack.
Negating will always negate, if the first two questions are yes, then negating will always return the opposite.