My brain has gone into meltdown trying to work out how to do this seemingly simple code.
            
            
             float angle;
            
            
             void mouseDragged(){
            
            
                   angle - atan2(mouseY-height/2,mouseX-width/2)
            
            
             }
            
            
             void draw(){
            
            
             background(150);
            
            
             translate(width/2,height/2);
            
            
             rotate(angle);
            
            
             rectMode(CENTER);
            
            
             rect(0,0,25,25);
            
            
             }
            
            
             help would be brilliant :L
            
 
            
              
              1  
            
 
            
 
 
          