loop from 0 to Pi to -Pi to 0
              in 
             Programming Questions 
              •  
              4 months ago    
            
 
           
             I calculate the angle of objects seen from the center.
            
            
             I also have a radar kind of thing.
            
            
             For that i use 
            
            
             a += 0.01;
            
            
             a = a % TWO_PI;
            
            
             It goes good until 3.14. What is an easy way to go from 0 to PI and then from -PI to 0?
            
            
             I know i can also add PI to the objects with negative values but i just wonder for the purpose of learning.
            
             
              
              1  
            
 
            
 
 
          