The rotate_around_point function in math.py has a bug on line 394 where it adds the rotated displacement vector to the target point instead of the source point (rotation center).
The current code is the following:
return target[0] + dx, target[1] + dy
Example of the bug:
Rotating point (5, 0) around (3, 0) by 90° currently returns (5, 2) but should return (3, 2).
This is a simple one line fix just have to update return statement to:
return source[0] + dx, source[1] + dy
I can make a PR for the update.