diff options
Diffstat (limited to 'src/map/rect_room.rs')
| -rw-r--r-- | src/map/rect_room.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/map/rect_room.rs b/src/map/rect_room.rs index 5008c63..ee184fb 100644 --- a/src/map/rect_room.rs +++ b/src/map/rect_room.rs @@ -1,7 +1,6 @@ use crate::colours::DEFAULT_COLOURS; use crate::map::Mappable; -use crate::math::{Rect, Vec2}; -use crate::scaleable::Scaleable; +use crate::math::Rect; use crate::transform::Transform; use raylib::drawing::{RaylibDraw, RaylibDrawHandle}; use serde::Serialize; @@ -47,21 +46,6 @@ impl Mappable for RectRoom { fn bounding_rect(&self) -> Rect<f64> { self.data.clone() } - - fn as_scaleable(&self) -> Option<&dyn Scaleable> { - Some(self as &dyn Scaleable) - } -} - -impl Scaleable for RectRoom { - fn scale(&mut self, by: &Vec2<f64>) { - if by.x < 0. || by.y < 0. { - panic!("Cannot set dimensions with negative size"); - } - - self.data.x *= by.x; - self.data.y *= by.y; - } } impl Deref for RectRoom { |
