From 09d13f186fa5b8ee4a123c928ffd7937e2f384b1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 15 Dec 2017 14:24:20 -0600 Subject: [PATCH] Correct unskew, after all --- Marlin/src/module/planner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 73b4b069c6..842ff2d213 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -363,7 +363,7 @@ class Planner { FORCE_INLINE static void unskew(float &cx, float &cy, const float &cz) { if (WITHIN(cx, X_MIN_POS, X_MAX_POS) && WITHIN(cy, Y_MIN_POS, Y_MAX_POS)) { - const float sx = cx + cy * xy_skew_factor + cz * (xz_skew_factor - (xy_skew_factor * yz_skew_factor)), + const float sx = cx + cy * xy_skew_factor + cz * xz_skew_factor, sy = cy + cz * yz_skew_factor; if (WITHIN(sx, X_MIN_POS, X_MAX_POS) && WITHIN(sy, Y_MIN_POS, Y_MAX_POS)) { cx = sx; cy = sy;