YuanTian1991 / ChAMP

19 stars 22 forks source link

Use longer form of logical operators (&& and ||) in if statements. #20

Open mcol opened 2 years ago

mcol commented 2 years ago

The single-character operators (& and |) are for elementwise operations, but if statements don't work on vectors. Using the longer form has also the advantage of not evaluating the second operand if the result is known after evaluating the first.