mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 20:40:28 +00:00
Merge pull request #5766 from rope-hmg/master
Added PointInRectFloat to SDL3
This commit is contained in:
6
vendor/sdl3/sdl3_rect.odin
vendored
6
vendor/sdl3/sdl3_rect.odin
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user