Check if a variable is between two numbers with Java

后端 未结 7 1995
暗喜
暗喜 2020-12-10 13:35

I have a problem with this code:

if (90 >>= angle =<< 180)

The error explanation is:

The left-hand side

7条回答
  •  醉话见心
    2020-12-10 13:38

    I see some errors in your code.
    Your probably meant the mathematical term

    90 <= angle <= 180, meaning angle in range 90-180.

    if (angle >= 90 && angle <= 180) {
    
    // do action
    }
    

提交回复
热议问题