diff --git a/website/other/bezier-rs-demos/wasm/src/bezier.rs b/website/other/bezier-rs-demos/wasm/src/bezier.rs index 68c0c1e536..67dfc47524 100644 --- a/website/other/bezier-rs-demos/wasm/src/bezier.rs +++ b/website/other/bezier-rs-demos/wasm/src/bezier.rs @@ -232,7 +232,7 @@ impl WasmBezier { let intersection_point = self.0.evaluate(t); let normal_point = self.0.normal(t); let curvature = self.0.curvature(t); - let content = if curvature < 0.000001 { + let content = if curvature.abs() < 0.000001 { // Linear curve segment: the radius is infinite so we don't draw it format!("{bezier}{}", draw_circle(intersection_point, 3., RED, 1., WHITE)) } else { diff --git a/website/other/bezier-rs-demos/wasm/src/subpath.rs b/website/other/bezier-rs-demos/wasm/src/subpath.rs index cca7e2c2cb..f672e70f3e 100644 --- a/website/other/bezier-rs-demos/wasm/src/subpath.rs +++ b/website/other/bezier-rs-demos/wasm/src/subpath.rs @@ -349,7 +349,7 @@ impl WasmSubpath { let intersection_point = self.0.evaluate(t); let normal_point = self.0.normal(t); let curvature = self.0.curvature(t); - let content = if curvature < 0.000001 { + let content = if curvature.abs() < 0.000001 { // Linear curve segment: the radius is infinite so we don't draw it format!("{subpath}{}", draw_circle(intersection_point, 3., RED, 1., WHITE)) } else {