John Jericho wrote:
Those aren't boolean comparisons - they are assignments. And because the result of an assignment is the new value of the variable this is perfectly legal syntax.
But this is exactly the reason why
you should never write == true or == false. The following is better:
But when the if-statement does not get executed then inPoly is false and !inPoly will always return true, so this can be shortened even further: