Hi,
I have a math problem with a rotation.
I have an array of point and I want to make a rotation of all points, this is my code:
Code
RelativeXPos = item.x - X0;RelativeYPos = item.y - Y0;
resultX = (cos(rad)*RelativeXPos) + (-sin(rad)*RelativeYPos) + X0;
resultY = (sin(rad)*RelativeXPos) + (cos(rad)*RelativeYPos) + Y0;
item is my point object, X0 and Y0 is the center of the rotation, I use a matrix calcul for find the coordinates.
But the coordinates must be an integer and I try the 3 functions: round(), ceil() and floor(), I have always a non-smooth movement when I attach an active to each points of my extension.
Do you have any answer of my problem ?
Thanks.