pub fn in_bounds(&self, bounds: Bounds) -> bool {
        bounds.min.x <= self.pos.x
            && self.pos.x <= bounds.max.x
            && bounds.min.y <= self.pos.y
            && self.pos.y <= bounds.max.y
    }
/// Tests if the food is inside the bounds. Useful when the screen is
/// resized.
Tests if the food is inside the bounds. Useful when the screen is
resized.
Tests if the food is inside the bounds . Useful when the screen is resized .
pub fn in_bounds(&self, bounds: Bounds) -> bool {
        bounds.min.x <= self.pos.x
            && self.pos.x <= bounds.max.x
            && bounds.min.y <= self.pos.y
            && self.pos.y <= bounds.max.y
    }
pub fn in_bounds ( & self , bounds : Bounds ) -> bool { bounds . min . x <= self . pos . x && self . pos . x <= bounds . max . x && bounds . min . y <= self . pos . y && self . pos . y <= bounds . max . y }
Tests if the food is inside the bounds.
Tests if the food is inside the bounds .
&self
bounds
Bounds
&self
bounds
Bounds