Merge pull request #5766 from rope-hmg/master

Added PointInRectFloat to SDL3
This commit is contained in:
gingerBill
2025-10-11 11:03:38 +01:00
committed by GitHub

View File

@@ -29,6 +29,12 @@ PointInRect :: proc "c" (p: Point, r: Rect) -> bool {
(p.y >= r.y) && (p.y < (r.y + r.h)) )
}
@(require_results)
PointInRectFloat :: proc "c" (p: FPoint, r: FRect) -> bool {
return ( (p.x >= r.x) && (p.x <= (r.x + r.w)) &&
(p.y >= r.y) && (p.y <= (r.y + r.h)) )
}
@(require_results)
RectEmpty :: proc "c" (r: Rect) -> bool {
return r.w <= 0 || r.h <= 0