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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…