code: public static void computePosition (
          Point start, Point end, long elapsed, long duration, Point pos)
      {
          float pct = (float)elapsed / duration;
          int travx = (int)((end.x - start.x) * pct);
          int travy = (int)((end.y - start.y) * pct);
          pos.setLocation(start.x + travx, start.y + travy);
      }
docs: Computes the position of an entity along the path defined by the supplied start and end
  points assuming that it must finish the path in the specified duration (in millis) and has
  been traveling the path for the specified number of elapsed milliseconds.