given 4 coordinates, how do I calculate the angle forming at the center point?
I'm writing code in JavaScript and I have a request for rotation support with two fingers.
so, the user touch the screen with two fingers, and as he move his fingers clockwise/CC the image needs to rotate accordingly.
so the only data I have are the coordinates of the start position and the current position of the users two fingers.
I've added a link with an image for some visual explanation.

Let the position vectors of the four points be $\textbf{a}$, $\textbf{b}$, $\textbf{c}$, $\textbf{d}$, in anticlockwise order. Then what we have to do is to find the angle $\theta$ between the two vectors, $\textbf{a}-\textbf{c}$ and $\textbf{b}-\textbf{d}$. So $$ \cos\theta\cdot |\textbf{a}-\textbf{c}|\cdot|\textbf{b}-\textbf{d}|=(\textbf{a}-\textbf{c})\cdot(\textbf{b}-\textbf{d})=\textbf{a}\textbf{c}+\textbf{b}\textbf{d}-\textbf{a}\textbf{d}-\textbf{c}\textbf{b} $$ In the diagram, $\textbf{a}-\textbf{c}=(350-90,357-355)=(260,2)$, $\textbf{b}-\textbf{d}=(182,-132)$ (The diagram seems a bit off.)
$(\textbf{a}-\textbf{c})\cdot(\textbf{b}-\textbf{d})=47056$
$\cos\theta=0.8050, \theta=0.635rad$.
Since the diagram given is not completely clear, there may be some errors in the answer. But the mothod is certainly correct.