I thought of calculating the angles with the Math.atan2 function.
For example:
if i have the points A(xa,ya), B(xb,yb), C(xc,yc) and i want to find angle between AB and AC
i will do for the AB: angle=(yb-ya , xb-xa) and for the AC: angle=(yc-ya , xc-xa)
And i will save each angle in a vector,so i can sort them later.
Is it wrong?