Function rotate

Rotates a point (x, y) around another point (cx, cy) by a given angle. Returns the rotated point as a Point object.