From c9098288f50564de2ba26e64b67344f256e202ae Mon Sep 17 00:00:00 2001 From: 4JX <79868816+4JX@users.noreply.github.com> Date: Sun, 6 Feb 2022 16:30:34 +0100 Subject: [PATCH] Fix a typo: tolerence -> tolerance (#1214) --- egui/src/introspection.rs | 4 ++-- epaint/src/tessellator.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/egui/src/introspection.rs b/egui/src/introspection.rs index 615ac8d2..d0b34638 100644 --- a/egui/src/introspection.rs +++ b/egui/src/introspection.rs @@ -144,13 +144,13 @@ impl Widget for &mut epaint::TessellationOptions { debug_paint_clip_rects, debug_paint_text_rects, debug_ignore_clip_rects, - bezier_tolerence, + bezier_tolerance, epsilon: _, } = self; ui.checkbox(anti_alias, "Antialias") .on_hover_text("Turn off for small performance gain."); ui.add( - crate::widgets::Slider::new(bezier_tolerence, 0.0001..=10.0) + crate::widgets::Slider::new(bezier_tolerance, 0.0001..=10.0) .logarithmic(true) .show_value(true) .text("Spline Tolerance"), diff --git a/epaint/src/tessellator.rs b/epaint/src/tessellator.rs index 359e501f..2db85348 100644 --- a/epaint/src/tessellator.rs +++ b/epaint/src/tessellator.rs @@ -302,7 +302,7 @@ pub struct TessellationOptions { pub debug_ignore_clip_rects: bool, /// The maximum distance between the original curve and the flattened curve. - pub bezier_tolerence: f32, + pub bezier_tolerance: f32, /// The default value will be 1.0e-5, it will be used during float compare. pub epsilon: f32, @@ -319,7 +319,7 @@ impl Default for TessellationOptions { debug_paint_text_rects: false, debug_paint_clip_rects: false, debug_ignore_clip_rects: false, - bezier_tolerence: 0.1, + bezier_tolerance: 0.1, epsilon: 1.0e-5, } } @@ -753,7 +753,7 @@ impl Tessellator { return; } - let points = quadratic_shape.flatten(Some(options.bezier_tolerence)); + let points = quadratic_shape.flatten(Some(options.bezier_tolerance)); self.tessellate_bezier_complete( &points, @@ -777,7 +777,7 @@ impl Tessellator { } let points_vec = - cubic_shape.flatten_closed(Some(options.bezier_tolerence), Some(options.epsilon)); + cubic_shape.flatten_closed(Some(options.bezier_tolerance), Some(options.epsilon)); for points in points_vec { self.tessellate_bezier_complete(