title: Adjusting Coordinates Given Angle / Window Size in JFrame
body: <p>So this may be a fairly simple question, however I've been writing this code for over 8 hours so my brain is slightly pooped. Basically, I have a frame that looks like this: (<a href="https://imgur.com/a/DFSI5" rel="nofollow noreferrer">http://imgur.com/a/DFSI5</a>)</p>
  
  <p>If you'll excuse my crude drawing, I was wondering about the maths. Given the angle theta, what I want to do is, given a specific Point object, that will be the bullet I shoot, how do I adjust the x/y coordinates in parallel to move along that given angle? There is a window size of 700x500 inside the JFrame. I'll post the code in a pastebin if it is quite necessary but I felt that this question was purely arithmetic (sin/cos/tan) related. </p>
  
  <p>Basically I have this:</p>
  
  <pre><code>        if(pinballAngle &gt; 90){
              pinballCoordinate.x+=(pinballAngle/3);
              pinballCoordinate.y-=20;
          }
          else if(pinballAngle &lt; 90){
              pinballCoordinate.x+=(pinballAngle/3);
              pinballCoordinate.y-=20;
          }
          else{
              pinballCoordinate.y-=20;
          }
  </code></pre>
  
  <p>So pinballCoordinate is the Point object that I am trying to adjust given the angle of theta, that is the 'gun' that shoots the pinball. The 'pinballAngle' variable is the angle of the gun. </p>