1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use super::*;
mod traits;
impl Rectangle {
pub fn new(x: f32, y: f32, width: f32, height: f32) -> Self {
Self { x, y, width, height }
}
}
impl Rectangle {
pub fn get_x(&self) -> f32 {
self.x
}
pub fn get_y(&self) -> f32 {
self.y
}
pub fn get_width(&self) -> f32 {
self.width
}
pub fn get_height(&self) -> f32 {
self.height
}
}