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
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Has been cancelled
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user