From 43cdc4685394ed9c1cef37bd1d65d0e97ca0c557 Mon Sep 17 00:00:00 2001 From: Yves Biener Date: Tue, 4 Mar 2025 14:51:26 +0100 Subject: [PATCH] fix(input/mouse): correct boundary check for mouse position inside of given origin and size --- src/input.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input.zig b/src/input.zig index 8252b84..b294260 100644 --- a/src/input.zig +++ b/src/input.zig @@ -36,8 +36,8 @@ pub const Mouse = packed struct { } pub fn in(this: @This(), origin: Point, size: Point) bool { - return this.x >= origin.x and this.x <= size.x + origin.x and - this.y >= origin.y and this.y <= size.y + origin.y; + return this.x >= origin.x and this.x < size.x + origin.x and + this.y >= origin.y and this.y < size.y + origin.y; } };