mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Tesselator: ignore non-positive clip rectangles
Closes https://github.com/emilk/egui/issues/328
This commit is contained in:
@@ -304,16 +304,19 @@ impl Rect {
|
||||
}
|
||||
|
||||
/// `min.x <= max.x && min.y <= max.y`.
|
||||
#[inline(always)]
|
||||
pub fn is_non_negative(&self) -> bool {
|
||||
self.min.x <= self.max.x && self.min.y <= self.max.y
|
||||
}
|
||||
|
||||
/// True if all members are also finite.
|
||||
#[inline(always)]
|
||||
pub fn is_finite(&self) -> bool {
|
||||
self.min.is_finite() && self.max.is_finite()
|
||||
}
|
||||
|
||||
/// True if any member is NaN.
|
||||
#[inline(always)]
|
||||
pub fn any_nan(self) -> bool {
|
||||
self.min.any_nan() || self.max.any_nan()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user