1
0
Fork 0
forked from wry/wry

rect: add not_contains

This commit is contained in:
Julian Orth 2025-11-30 15:48:02 +01:00
parent 17c9be372a
commit d717aee055

View file

@ -204,6 +204,10 @@ where
self.raw.x1 <= x && self.raw.y1 <= y && self.raw.x2 > x && self.raw.y2 > y
}
pub fn not_contains(&self, x: i32, y: i32) -> bool {
!self.contains(x, y)
}
pub fn dist_squared(&self, x: i32, y: i32) -> i32 {
let mut dx = 0;
if self.raw.x1 > x {