From d462be6de62f9e49805a88b0eeca836ab44b658b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 17 Apr 2018 15:59:04 -0500 Subject: [PATCH] Try FIXFLOAT rounding based on sign --- Marlin/src/core/macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index c61e7d4cbe..28cbbb18ae 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -208,7 +208,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