Do Delta radius check without sqrt

This commit is contained in:
Scott Lahteine 2016-08-19 05:05:48 -05:00
parent 044f800be9
commit 12d72363cb

View file

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