I need to get local coords from global coords. I did not find ready-made examples.
Please help me how to do it on the example image. Thank you!
UPDATED:
Here's the method in the java, created thanks to your help! It works for me :) Thank you!
public static double[] getLocalFromGlobal(int pointX, int pointY, int localX, int localY, float angle) {
float px = pointX - localX;
float py = pointY - localY;
double cos = Math.cos((Math.PI / 180) * angle);
double sin = Math.sin((Math.PI / 180) * angle);
double finalX = (px * cos) + (py * sin);
double finalY = -(px * sin) + (py * cos);
return new double[]{finalX, finalY};
}