From 1595fdb54b1f10f2e3e01393d6b7aceb09f96b6d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 13 Apr 2021 23:23:06 -0500 Subject: [PATCH] Use sq --- Marlin/src/module/scara.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/scara.cpp b/Marlin/src/module/scara.cpp index cc177f76c2..e058804c90 100644 --- a/Marlin/src/module/scara.cpp +++ b/Marlin/src/module/scara.cpp @@ -204,7 +204,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE y = r * sin(RADIANS(a)), rho2 = L1_2 + L2_2 - 2.0f * L1 * L2 * cos(RADIANS(w)); - cartes = robot_offset + xyz_pos_t({ x, y, SQRT(rho2 - x * x - y * y) }); + cartes = robot_offset + xyz_pos_t({ x, y, SQRT(rho2 - sq(x) - sq(y)) }); } // Home YZ together, then X (or all at once). Based on quick_home_xy & home_delta