From 1aa3283d1b23ece8ad43b1d8ed8ed0ecf7842c35 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 7 Oct 2025 12:58:08 +0100 Subject: [PATCH 1/2] Added PointInRectFloat to SDL3 --- vendor/sdl3/sdl3_rect.odin | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vendor/sdl3/sdl3_rect.odin b/vendor/sdl3/sdl3_rect.odin index 53470dec4..10e741de1 100644 --- a/vendor/sdl3/sdl3_rect.odin +++ b/vendor/sdl3/sdl3_rect.odin @@ -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 From 65acbe1788bb101ea700f1ccd68f94d2f6ff4926 Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 10 Oct 2025 15:26:50 +0100 Subject: [PATCH 2/2] Changed indentation to tabs --- vendor/sdl3/sdl3_rect.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sdl3/sdl3_rect.odin b/vendor/sdl3/sdl3_rect.odin index 10e741de1..6af9dc937 100644 --- a/vendor/sdl3/sdl3_rect.odin +++ b/vendor/sdl3/sdl3_rect.odin @@ -31,8 +31,8 @@ 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)) ) + return ( (p.x >= r.x) && (p.x <= (r.x + r.w)) && + (p.y >= r.y) && (p.y <= (r.y + r.h)) ) } @(require_results)