From 12d72363cb58d3afed33bb33d690c6aa6c4bc015 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 19 Aug 2016 05:05:48 -0500 Subject: [PATCH] Do Delta radius check without sqrt --- Marlin/Marlin_main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 0c64defb2..3fa9725d5 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3667,8 +3667,7 @@ inline void gcode_G28() { #if ENABLED(DELTA) // Avoid probing outside the round or hexagonal area of a delta printer - float distance_from_center = HYPOT(xProbe, yProbe); - if (distance_from_center > DELTA_PROBEABLE_RADIUS) continue; + if (sq(xProbe) + sq(yProbe) > sq(DELTA_PROBEABLE_RADIUS)) continue; #endif float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);