From 8c1262dd3fb4d0d7723b7097493c1cbc14d4825f Mon Sep 17 00:00:00 2001 From: Eyal Date: Fri, 13 Jul 2018 11:57:52 +0300 Subject: [PATCH] Replace infinity tests with inequality --- src/octoprint/util/gcodeInterpreter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/gcodeInterpreter.py b/src/octoprint/util/gcodeInterpreter.py index 6753d9238..e4d0678fc 100644 --- a/src/octoprint/util/gcodeInterpreter.py +++ b/src/octoprint/util/gcodeInterpreter.py @@ -165,7 +165,7 @@ class MinMax3D(object): for c in "xyz": min = getattr(self.min, c) max = getattr(self.max, c) - value = abs(max - min) if not math.isinf(min) and not math.isinf(max) else 0.0 + value = abs(max - min) if max >= min else 0.0 setattr(result, c, value) return result