Check if a polygon overlaps with a rectangle

From Rosetta Code
Revision as of 06:41, 30 July 2023 by Ididjdjjdjd (talk | contribs) (Created page with "{{task}}Self-explanatory: given a polygon (as an array/vector/list of its vertices) and a rectangle (in x, y, width, height format), check if they intersect.")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Check if a polygon overlaps with a rectangle
You are encouraged to solve this task according to the task description, using any language you may know.

Self-explanatory: given a polygon (as an array/vector/list of its vertices) and a rectangle (in x, y, width, height format), check if they intersect.