title: My code does exactly what it has to do, but i have no idea why
body: <p>is supposed to calculate the coordinates of a projectile launched with respect to time (steps of 100ms), with a linear equation, and it outputs linear numbers, but if i plot this equation with CalcMe.com (math tool) it makes a parabolic plot</p>
  
  <pre><code>InVel = Double.parseDouble(jTextField1.getText());
      g = Double.parseDouble(jTextField8.getText());
  
      y = 1;
  
      while(y &gt;= -1) {
          t += 100;
          x = InVel * TimeUnit.MILLISECONDS.toSeconds(t) * Math.cos(45);
          y = InVel * TimeUnit.MILLISECONDS.toSeconds(t) * Math.sin(45) - (1 / 2) * g * Math.pow(TimeUnit.MILLISECONDS.toSeconds(t), 2);
          //System.out.print(Double.toString(x));
          //System.out.printf(" ");
          System.out.print(Double.toString(y));
          System.out.printf("%n");
      }
  
      jTextField6.setText(Double.toString(x));
  </code></pre>
  
  <p>the code is in java</p>
  
  <p>g is constant (9.8)
  and invel is given by user so its constant too
  g is the gravity and invel the initial velocity of the projectile
  the equation is:<code>x=invel*time*cos(45)</code> and <code>y=invel*time*sin(45)-(1/2)*g*t^2</code></p>
  
  <p>anyone can help me?</p>