title: C++: Rotating a vector around a certain point
body: <p>I am trying to rotate a vector around a certain point on the vector(in C++):</p>
  
  <pre><code>1 2 3
  4 5 6
  7 8 9
  </code></pre>
  
  <p>rotated around the point (1,1) (which is the "5")  90 degrees would result in:</p>
  
  <pre><code>7 4 1
  8 5 2
  9 6 3
  </code></pre>
  
  <p>Right now I am using:</p>
  
  <pre><code>x = (x * cos(90)) - (y * sin(90))
  y = (y * cos(90)) + (x * sin(90))
  </code></pre>
  
  <p>But I don't want it rotated around (0,0)</p>