From 1191d9fa86bcb33b57b264b0105f986005f6a6c6 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 17 Sep 2024 15:32:17 +0200 Subject: [PATCH] Remove debug-assert that false-positived on large f32 values due to precision problems --- crates/egui/src/layout.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/egui/src/layout.rs b/crates/egui/src/layout.rs index 03b3bbd5287..5981ff52402 100644 --- a/crates/egui/src/layout.rs +++ b/crates/egui/src/layout.rs @@ -660,8 +660,6 @@ impl Layout { let rect = self.align_size_within_rect(size, frame); debug_assert!(!rect.any_nan()); debug_assert!(!rect.is_negative()); - debug_assert!((rect.width() - size.x).abs() < 1.0 || size.x == f32::INFINITY); - debug_assert!((rect.height() - size.y).abs() < 1.0 || size.y == f32::INFINITY); rect }