title: Calculating a location on a circle given an angle of rotation
body: <p>Okay algebra and trig are not my strong suit by any means so here is what I need to do.</p>
  
  <p>I have a circle which is measured in degrees from +180 to -180   (360 total)</p>
  
  <p>Given the center point of the circle stays the same, Cx , Cy.
  The angle varies from -180 to +180  </p>
  
  <p>I need to locate a point that regardless the given angle is + 3 units away that is at the 90 degree position and the 270 degree position (from the given degrees)</p>
  
  <p>So like...<br>
      Angle = 0
      Point 1 ->  x = 0, y -3
      Point 2 ->  x = 0, y + 3</p>
  
  <p>And if the angle was say 90 (provided its measured Clockwise)
      Point 1 -> x = -3, y = 0
      Point 2 -> x = 3, y = 0</p>
  
  <p>What I need is a forumla that will accept Angle, then tell me what my x/y should be 3 units away from the origin. </p>
  
  <p>I have tried:  EDIT Updated to double precision using Java.</p>
  
  <p>`double x = Cx + 3 * Math.cos((d + 90) * Math.PI / 180);'</p>
  
  <p>'double y = Cy + 3 * Math.sin((d + 90) * Math.PI / 180);`</p>
  
  <p>this gives me mixed results, I mean sometimes it's where I think it should be and other times its quite wrong.</p>
  
  <pre><code>Assuming Cx = 0.500, Cy = 0.500
  Sample Data:      Result:
  Deg = 0           x =  2 / y = 5
  Deg = 90          x = -1 / y = 2
  Deg = 125         x = -0.457 / y = 0.297
  Deg = 159         x =  0.924 / y = -0.800
  </code></pre>
  
  <p>I realize I am only calculating one point at this point but do you have any suggestions on how to get the first point working?  at say 90 degrees from whatever degree I start with?</p>