Because the corners are not rotating around a centerby Lisztfr (no login)
Your 4 points are not rotating.
If the 4 corners are not following a circle, this is not good.
Clippy will tell you about ang, draw, ... tang...in DRAW there are angle functions.
Else there should be more trigonometric stuff in your code... :)