Closed skejeton closed 1 week ago
returns intersection rect between two rects.
fn rectIntersection*(a, b: rect::Rect): rect::Rect { x := max(a.x, b.x) y := max(a.y, b.y) return {x, y, min(a.x + a.w, b.x + b.w) - x, min(a.y + a.h, b.y + b.h) - y} }
Make a PR
I'm saving this for after we're done with the API update.
returns intersection rect between two rects.