Browse Source

Do Delta radius check without sqrt

Scott Lahteine 9 years ago
parent
commit
12d72363cb
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      Marlin/Marlin_main.cpp

+ 1
- 2
Marlin/Marlin_main.cpp View File

@@ -3667,8 +3667,7 @@ inline void gcode_G28() {
3667 3667
 
3668 3668
           #if ENABLED(DELTA)
3669 3669
             // Avoid probing outside the round or hexagonal area of a delta printer
3670
-            float distance_from_center = HYPOT(xProbe, yProbe);
3671
-            if (distance_from_center > DELTA_PROBEABLE_RADIUS) continue;
3670
+            if (sq(xProbe) + sq(yProbe) > sq(DELTA_PROBEABLE_RADIUS)) continue;
3672 3671
           #endif
3673 3672
 
3674 3673
           float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);

Loading…
Cancel
Save