Quote:

d = 45;

xdistance = x2 - x;

ydistance = y2 - y;

distance = Math.sqrt(xdistance*xdistance+ydistance*ydistance) ;

y = y2+distance*Math.sin(d);

x = x2+distance*Math.cos(d);

variables:

d is the amount of rotation in degrees

x is the x coordinate of the point to be rotated

y is the y coordinate of the point to be rotated

x2 is the x coordinate of the axis

y2 is the y coordinate of the axis

distance is the distance between point 1 and point 2

But this doesn't work properly: The point DOES rotate, and in a good circle with a radius equal to "distance", but it doesn't rotate 45 degrees, but much more. I hope i've been clear to you all, because i'm not English :P