Browse Source

fixed minimum macro (#11986)

LineF 6 years ago
parent
commit
d777cef837
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/core/macros.h

+ 1
- 1
Marlin/src/core/macros.h View File

@@ -123,7 +123,7 @@
123 123
   #define _NUM_ARGS(X,X6,X5,X4,X3,X2,X1,N,...) N
124 124
   #define NUM_ARGS(...) _NUM_ARGS(0, __VA_ARGS__ ,6,5,4,3,2,1,0)
125 125
 
126
-  #define MIN_2(a,b)      ({__typeof__(a) _a = (a); __typeof__(b) _b = (b); _a > _b ? _a : _b;})
126
+  #define MIN_2(a,b)      ({__typeof__(a) _a = (a); __typeof__(b) _b = (b); _a < _b ? _a : _b;})
127 127
   #define MIN_3(a,...)    MIN_2(a,MIN_2(__VA_ARGS__))
128 128
   #define MIN_4(a,...)    MIN_2(a,MIN_3(__VA_ARGS__))
129 129
   #define MIN_5(a,...)    MIN_2(a,MIN_4(__VA_ARGS__))

Loading…
Cancel
Save