(&self, position: Vec2)
| 99 | |
| 100 | impl CanvasParams { |
| 101 | pub fn within_rect(&self, position: Vec2) -> bool { |
| 102 | let size = self.original_size * self.scale; |
| 103 | position.x < self.position.x + size.x / 2.0 |
| 104 | && position.x > self.position.x - size.x / 2.0 |
| 105 | && position.y < self.position.y + size.y / 2.0 |
| 106 | && position.y > self.position.y - size.y / 2.0 |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | #[derive(Resource, Default)] |
no outgoing calls
no test coverage detected