freeone3000
public java v1 · immutable public void updatePosition(long timePassed) { double secs = timePassed / 1000.0; int dx = 0; for(int i=0; i<secs; i++) { speed += acceleration; dx += (int)speed; } this.curPos.setX(curPos.getX()+dx); }