Guest User

Untitled

a guest
Jul 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. /**
  2. * Methode floating.<br />
  3. * Bewegt die Sterne zum rechten Bildrand.
  4. */
  5. public void floating()
  6. {
  7. double angle = Math.toRadians(getRotation());
  8. int x = (int) Math.round(getX() + Math.cos(angle) * (double)GESCHWINDIGKEIT);
  9. int y = getY();
  10. setLocation(x, y);
  11. }
Add Comment
Please, Sign In to add comment