From 1aa3283d1b23ece8ad43b1d8ed8ed0ecf7842c35 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 7 Oct 2025 12:58:08 +0100 Subject: [PATCH] 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