14 lines
216 B
Rust
14 lines
216 B
Rust
pub struct Rect {
|
|
pub min: Vec2,
|
|
pub max: Vec2,
|
|
}
|
|
|
|
impl Rect {
|
|
pub fn width(&self) -> f32 {
|
|
self.max.x - self.min.x
|
|
}
|
|
|
|
pub fn height(&self) -> f32 {
|
|
self.max.y - self.min.y
|
|
}
|
|
} |