fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. float timePerPixel = 1000000000 / 100;
  13. long playerStartTime = (long) 659412553059l;
  14.  
  15. //player.getDistanceX could be 312.54 or any other float number
  16. //float timeToTravel = player.GetDistanceX(playerTargetX) * timePerPixel;
  17.  
  18. float timeToTravel = 100 * timePerPixel;
  19. System.out.println("timeToTravel: " + timeToTravel);
  20. float playerEndTime = ((float) playerStartTime + timeToTravel);
  21. System.out.println("endTime:" + playerEndTime);
  22.  
  23. }
  24. }
Success #stdin #stdout 0.12s 320576KB
stdin
Standard input is empty
stdout
timeToTravel: 1.0E9
endTime:6.6041256E11