Awkwardsaw
2011-02-07 22:37:32
Camaro had me make this because the RotatePoint in simba doesnt really work perfectly(has to inverse the x coord)
p: the origional point, make sure you get it at perfect north
o: the origin to spin at
d: the angle in degrees
so i thought it would be usefull in srl, so MouseMM() can work once again :)
function RotatePointEx(p, o:tPoint; d:Extended):TPoint ;
begin
p.x := p.x + (0 - o.x);
p.y := p.y + (0 - o.y);
Result.x := (round(p.x * cos(d * (PI / 180)) - (p.y * sin(d * (PI / 180))))) - o.x * -1;
Result.y := (round(sin(d * (PI / 180)) * p.x + cos(d * 1 * (PI / 180)) * p.y)) - o.y * -1;
end; p: the origional point, make sure you get it at perfect north
o: the origin to spin at
d: the angle in degrees
so i thought it would be usefull in srl, so MouseMM() can work once again :)