mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Minor improvements
This commit is contained in:
@@ -134,6 +134,7 @@ impl Rect {
|
||||
pub fn min(&self) -> Vec2 {
|
||||
self.pos
|
||||
}
|
||||
|
||||
pub fn max(&self) -> Vec2 {
|
||||
self.pos + self.size
|
||||
}
|
||||
@@ -141,6 +142,12 @@ impl Rect {
|
||||
pub fn size(&self) -> Vec2 {
|
||||
self.size
|
||||
}
|
||||
pub fn width(&self) -> f32 {
|
||||
self.size.x
|
||||
}
|
||||
pub fn height(&self) -> f32 {
|
||||
self.size.y
|
||||
}
|
||||
|
||||
// Convenience functions:
|
||||
pub fn left_top(&self) -> Vec2 {
|
||||
|
||||
Reference in New Issue
Block a user