There is issue when called against these two polygons.
[{"x":903,"y":429},{"x":1184,"y":429},{"x":1184,"y":621},{"x":903,"y":621}]
[{"x":902,"y":441},{"x":1185,"y":441},{"x":1185,"y":631},{"x":902,"y":631}]
Both Are rectangles not rotated, but the result is a triangle which isn't possible!
This is the result I get which I think is incorrect.
[{"x":903,"y":441},{"x":903,"y":621},{"x":1184,"y":441}]