java get the coordinate with random angle
<p>i'm writing a program that click JPanel and then a circle will spawn then its x &amp; y will add 10 pixel per frame. The following two lines are temporarily to determine the next step after the circle spawn.</p>

<pre><code>    destinationX = -10 + (int)(Math.random() * ((10 - (-10)) + 1));
    destinationY = -10 + (int)(Math.random() * ((10 - (-10)) + 1));
</code></pre>

<p>The above code is not the best to determine the position of the second steps of the cirlce. I want apply a method which make possibilities much more even. The following way is i about to do.....</p>

<pre><code>           x2,y2     
             /
            /
           /
          /
         /
      h /
       /
      / a
      ----------------------------
   x1,y1
</code></pre>

<p>x1,y2 are known, a is random 360 degrees, h is 10, how to cal x2, y2?</p>
