So I'm attempting to use clipper to do some polygon intersection for a 2d level editor I'm working on, however when trying to split rooms that cross over into their respective 'sectors' I'm seeing some weird results come back from an execution of Clipper, below is an image of the the shapes I'm creating:

I've drawn the 5 sided polygon, and the horizontal 'rectangle', and I'd expect the editor to split this into 5 separate polygons, I'd be achieving this by doing a ctIntersection on the 2 shapes to get the section that overlaps, then I use this to execute individually ctDifference on the 2 original shapes against the intersection, but the result I'm getting against the rectangle is as below:

I'd expect to get 2 results from the ctDifference between the intersect & the rectangle, one of each external polygon, however I get 1 result with 9 elements
I've attached a minimal reproducible example, coords in the test match precicesly what is being rendered in the images above, let me know if you need anymore info
Anonymous
Sorry this is actually my bug, I forgot to sign up before creating *facepalm*