Added PointInRectFloat to SDL3

This commit is contained in:
Hector
2025-10-07 12:58:08 +01:00
parent 185e7cd538
commit 1aa3283d1b
+6
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