I just ran into this line of code:
if( lineDirection.length2() ){...}
where length2 returns a double. It kind of puzzles me that 0.0 is equivalent to 0, NULL, and/or false.
Is this part of the C++ standard or is it undefined behaviour?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is a very much Standard Behavior (Boolean Conversion)