if else float issue
              in 
             Programming Questions 
              •  
              2 years ago    
            
 
           
             Hi, I recently picked up processing. For a test I am doing, I wanted to create an object scale proportionally, but start growing faster after a certain point. I wanted to do it this way, but it doesn't. I get an error saying: "Cannot find Anyting named "p" "
            
             
            
            
             
            
            
             
              
               
             
            
            
             
            
            
             
            
            
 
            
           
             Here's the code:
            
            - float d = 61.5;
- if (d<61){ float p= (100- (d/1.2)); }
- else {float p= (50- ((d-60)*0.0138)); }
- float size1 = (height/100*p);
- fill (255,0,255);
- ellipse (width/2, height/2, size1, size1);
             Anyone knows where I'm making a mistake? Is it possible to combine if/else and a float-value? 
            
            
             Thanks!
            
 
            
              
              1  
            
 
            
 
 
          