title: Object wont follow projectile motion path
body: <p>Hi I was trying to work out a way to make an object move using projectile motion. When working on it myself for some reason I got an exponential movement instead of projectile. I have looked at other examples but they are kind of different since I have the coordinates of where it supposed to land and need to find the speed and the angle in which it must shoot the object.</p>
  
  <p>My code:</p>
  
  <pre><code>public void updateDir(){
  
      distY = (int)( projectedY - y);
      distX = (int)(projectedX - x);
      spdY = (double)(2*distY)/(time*time);
      spdX =  (double)(distX)/time;
      dir = Math.atan(spdY/spdX);
  
  
      System.out.println("spdY: " + spdY);
      System.out.println("spdX: " + spdX);
      System.out.println("dir: " + Math.toDegrees(dir));
  }
  
  
  public void move() {
      x +=   (spd*Math.cos(dir));
      y -=  (spd * Math.sin(dir));
  }
  </code></pre>
  
  <p>projectedY and projectedX are the coordinates that it should land on. </p>
  
  <p>So any reason why it's not moving in a projectile motion path, but instead going in an exponential path?</p>