diff --git a/src/shapes.rs b/src/shapes.rs index 0b902b92..c8872b6e 100644 --- a/src/shapes.rs +++ b/src/shapes.rs @@ -299,7 +299,7 @@ pub fn draw_line(x1: f32, y1: f32, x2: f32, y2: f32, thickness: f32, color: Colo let ny = dx; let tlen = (nx * nx + ny * ny).sqrt() / (thickness * 0.5); - if tlen < std::f32::EPSILON { + if tlen < f32::EPSILON { return; } let tx = nx / tlen; diff --git a/src/text.rs b/src/text.rs index 73d26130..6d65d8b1 100644 --- a/src/text.rs +++ b/src/text.rs @@ -148,8 +148,8 @@ impl Font { } let mut width = 0.; - let mut min_y = std::f32::MAX; - let mut max_y = -std::f32::MAX; + let mut min_y = f32::MAX; + let mut max_y = -f32::MAX; let atlas = self.atlas.lock().unwrap(); diff --git a/src/ui/render/mesh_rasterizer.rs b/src/ui/render/mesh_rasterizer.rs index b44310c9..1c12eece 100644 --- a/src/ui/render/mesh_rasterizer.rs +++ b/src/ui/render/mesh_rasterizer.rs @@ -210,7 +210,7 @@ impl DrawList { let ny = dx; let tlen = (nx * nx + ny * ny).sqrt() / (thickness * 0.5); - if tlen < std::f32::EPSILON { + if tlen < f32::EPSILON { return; } let tx = nx / tlen;