From 5c186f7dd383277000b9ec5b35bd630e93f7cf9c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 16 Apr 2018 04:44:36 -0500 Subject: [PATCH] Try FIXFLOAT rounding based on sign --- Marlin/macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/macros.h b/Marlin/macros.h index 75f32e852..b09812ad2 100644 --- a/Marlin/macros.h +++ b/Marlin/macros.h @@ -217,7 +217,7 @@ #define NEAR(x,y) NEAR_ZERO((x)-(y)) #define RECIPROCAL(x) (NEAR_ZERO(x) ? 0.0 : 1.0 / (x)) -#define FIXFLOAT(f) (f + 0.00001) +#define FIXFLOAT(f) (f + (f < 0.0 ? -0.00001 : 0.00001)) // // Maths macros that can be overridden by HAL