diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-11 11:03:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-11 11:03:38 +0100 |
| commit | 767098257eb5a6b4bc388ff3d21217f99292fbb9 (patch) | |
| tree | 8e4293b24e3141c2cdd13407ca6456ee1cfe01b0 /vendor | |
| parent | 227be05c0f5b53ef08d92782d690d04f43432eb9 (diff) | |
| parent | 65acbe1788bb101ea700f1ccd68f94d2f6ff4926 (diff) | |
Merge pull request #5766 from rope-hmg/master
Added PointInRectFloat to SDL3
Diffstat (limited to 'vendor')
| -rw-r--r-- | vendor/sdl3/sdl3_rect.odin | 6 |
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 } |