fix(input/mouse): correct boundary check for mouse position inside of given origin and size
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Has been cancelled

This commit is contained in:
2025-03-04 14:51:26 +01:00
parent 591b990087
commit 43cdc46853

View File

@@ -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;
}
};