What does y -= m < 3 mean?

后端 未结 8 2036
面向向阳花
面向向阳花 2021-01-30 20:03

While looking through some example C code, I came across this:

y -= m < 3;

What does this do? It it some kind of condensed for loop or som

8条回答
  •  一生所求
    2021-01-30 20:47

    m < 3 evaluates to 1 if m is less than 3. Hence, y is decreased by one in this case. Thus, an if statement avoided.

提交回复
热议问题