rect: add not_contains
This commit is contained in:
parent
17c9be372a
commit
d717aee055
1 changed files with 4 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue