title: Rotating Axis/Vector2 around origin
body: <p>I have a problem. I would like to rotate a vector2/values i get from the x and y of my controller joystick by an angle. </p>
  
  <p>for example a basic example would be if i was to press forward with the stick giving me a a value of x: 0 &amp; y: 1, then rotated that by 90 degrees it would give me a value of x:1 &amp; y:0.</p>
  
  <p>This image demonstrates what i want to do also. I appologies that it is poorly drawn its just quick.
  <a href="https://i.stack.imgur.com/1dl2x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1dl2x.png" alt="enter image description here"></a></p>
  
  <p>I need help where i am going wrong.
  I'm not great with vectors but i tried this equation which makes sense to me.
  <a href="https://i.stack.imgur.com/fshZp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fshZp.png" alt="enter image description here"></a></p>
  
  <p>I translated that into c# like this, but it doesn't work properly as the axis aren't producing values as they should do and the values they give are often exceeding 1 which is the max value i put into it.</p>
  
  <pre><code>Vector2 rotatedAxis = new Vector2 (
      inputValues.right * Mathf.Cos(rotationAngle) - inputValues.forward * Mathf.Sin(rotationAngle),
      inputValues.forward * Mathf.Cos(rotationAngle) + inputValues.right * Mathf.Sin(rotationAngle)
  );
  </code></pre>
  
  <p>The angle isn't an issue that gives me the the rotation from the forward line, which on the graph would be (0.1). Bit of added info if wanted about this angle, just gets the angle player is rotated from normal forward. I want to just transfer that rotation angle onto the axis as well so i get values that have been offset by that angle.</p>
  
  <p>Can anyone help. What am i doing wrong? 
  Thanks :)</p>