mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Add Rect::round
This commit is contained in:
@@ -245,6 +245,16 @@ impl Rect {
|
||||
)
|
||||
}
|
||||
|
||||
/// Round to integer
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn round(self) -> Self {
|
||||
Self {
|
||||
min: self.min.round(),
|
||||
max: self.max.round(),
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn intersects(self, other: Self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user