aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-10-11 11:03:38 +0100
committerGitHub <noreply@github.com>2025-10-11 11:03:38 +0100
commit767098257eb5a6b4bc388ff3d21217f99292fbb9 (patch)
tree8e4293b24e3141c2cdd13407ca6456ee1cfe01b0 /vendor
parent227be05c0f5b53ef08d92782d690d04f43432eb9 (diff)
parent65acbe1788bb101ea700f1ccd68f94d2f6ff4926 (diff)
Merge pull request #5766 from rope-hmg/master
Added PointInRectFloat to SDL3
Diffstat (limited to 'vendor')
-rw-r--r--vendor/sdl3/sdl3_rect.odin6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/sdl3/sdl3_rect.odin b/vendor/sdl3/sdl3_rect.odin
index 53470dec4..6af9dc937 100644
--- a/vendor/sdl3/sdl3_rect.odin
+++ b/vendor/sdl3/sdl3_rect.odin
@@ -30,6 +30,12 @@ PointInRect :: proc "c" (p: Point, r: Rect) -> bool {
}
@(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
}