skusil som to ale stale to blbne ... ten bod ide po kruhu ale nejde s mysou ... teda na zaciatku ide s mysou a potom stale zrychluje.
Kód:
double[] u = {(circleX - circleRadius) - circleX, 0};
double[] v = {e.getX() - circleX, e.getY() - circleY};
double cosAngle = (u[0] * v[0] + u[1] * v[1]) / (Math.sqrt(u[0] * u[0] + u[1] * u[1]) * Math.sqrt(v[0] * v[0] +
v[1] * v[1]));
point.setCenterX(circleX + circleRadius * Math.cos(Math.PI * cosAngle));
point.setCenterY(circleY + circleRadius * Math.sin(Math.PI * cosAngle));