Alternative for multiple if statements

前端 未结 4 1228
情话喂你
情话喂你 2021-01-14 09:19

My code contains a lot of multiple if statements. Is there any other way to get rid of these statements. For example suppose I have the following conditions

4条回答
  •  生来不讨喜
    2021-01-14 09:39

    If t1, t2, and t3 are 0 to positive infinity, modified logic is a little condensed:

    
    
       
          
       
       
       
    
    

    In either case, this is a good way to test out your modification vs the original.

提交回复
热议问题