title: mouse picking a rotating sprite in an Xna game
body: <p>I am working on a simple game where you click on square sprites before they disappear.  I decided to get fancy and make the squares rotate.  Now, when I click on the squares, they don't always respond to the click.  I think that I need to rotate the click position around the center of the rectangle(square) but I am not sure how to do this.  Here is my code for the mouse click:</p>
  
  <pre><code>    if ((mouse.LeftButton == ButtonState.Pressed) &amp;&amp;
      (currentSquare.Contains(mouse.X , mouse.Y )))
  </code></pre>
  
  <p>And here is the rotation logic:</p>
  
  <pre><code>    float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
  
          RotationAngle += elapsed;
          float circle = MathHelper.Pi * 2;
          RotationAngle = RotationAngle % circle;
  </code></pre>
  
  <p>I am new to Xna and programming in general, so any help is appreciated. </p>
  
  <p>Thanks a lot, </p>
  
  <p>Bill</p>