title: Algorithm for finding new points of rotating a vector
body: <p>I am trying to programmatically find the point created from rotating a vector around it's origin point (could be anywhere in 2D space).
  <img src="https://i.stack.imgur.com/3Neo5.png" alt="Example drawing here" /></p>
  <p>We see that we have our line (or vector for the math) <strong>A</strong> at some point of <strong>(x, y)</strong> that might be anywhere in 2D space. It runs to point <strong>B</strong> at some <strong>(x, y)</strong>. We rotate it by <strong>Theta</strong> which then moves to some point <strong>C</strong> at an <strong>(x, y)</strong>. The problem for me comes with trying to programmatically use math to solve for such.</p>
  <p>Originally the thought was to form a triangle and use trig but this angle could be exactly 180 (unlikely but possible) which obviously no triangle can work. Would anyone have ideas?</p>
  <p>I am using C# and my own vector object (below) to test out the creation of lines. Any help is appreciated!</p>
  <pre><code>struct Vector2D {
      double x, y, theta;
      Vector2D(double x, double y) {
          (this.x, this.y) = (x, y);
          theta = x != 0 ? Math.Atan(y / x) : 0;
      }
      double Magnitude() {
          return Math.Sqrt(Math.Pow(x, 2) + Math.Pow(y, 2));
      }
      (double,double) PointFromRotation(double angle) {
          // This is where I need some help...
          
          return (0,0); // hopefully a point of x and y from the angle argument
      }
  }
  </code></pre>