I am rotating points around a center point in 2D space. The points are the center point, the old mouse position, and the new mouse position. My rotation function works fin
Given vectors (x1,y1) and (x2,y2), I would suggest computing the cross product and dot product, and then using Atan2() on them. That will work in all cases where both vectors are non-zero and vector lengths are "reasonable".