I'm trying to implement rotation matrix. But a have a very strange effect:
This is my code:
public void rotation(PointF point, double a) {
point.x = (point.x - 400) * Math.cos(a) - (point.y - 300) * Math.sin(a)
+ 400;
point.y = (point.x - 400) * Math.sin(a) + (point.y - 300) * Math.cos(a)
+ 300;
}
In result a have a falling point in coordinates 400,300.
What is wrong? I want point to move by circle? How I can do better?