Sfoglia il codice sorgente

🧑‍💻 Min and max for base types

Scott Lahteine 2 anni fa
parent
commit
8627d4e5da
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. 6
    6
      Marlin/src/core/types.h

+ 6
- 6
Marlin/src/core/types.h Vedi File

@@ -348,9 +348,9 @@ struct XYval {
348 348
   // If any element is true then it's true
349 349
   FI operator bool()                                    { return x || y; }
350 350
   // Smallest element
351
-  FI T _min()                                     const { return _MIN(x, y); }
351
+  FI T small()                                    const { return _MIN(x, y); }
352 352
   // Largest element
353
-  FI T _max()                                     const { return _MAX(x, y); }
353
+  FI T large()                                    const { return _MAX(x, y); }
354 354
 
355 355
   // Explicit copy and copies with conversion
356 356
   FI XYval<T>           copy()                    const { return *this; }
@@ -505,9 +505,9 @@ struct XYZval {
505 505
   // If any element is true then it's true
506 506
   FI operator bool()                                   { return NUM_AXIS_GANG(x, || y, || z, || i, || j, || k, || u, || v, || w); }
507 507
   // Smallest element
508
-  FI T _min()                                    const { return _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }
508
+  FI T small()                                   const { return _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }
509 509
   // Largest element
510
-  FI T _max()                                    const { return _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }
510
+  FI T large()                                   const { return _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }
511 511
 
512 512
   // Explicit copy and copies with conversion
513 513
   FI XYZval<T>          copy()                   const { XYZval<T> o = *this; return o; }
@@ -660,9 +660,9 @@ struct XYZEval {
660 660
   // If any element is true then it's true
661 661
   FI operator bool()                                     { return 0 LOGICAL_AXIS_GANG(|| e, || x, || y, || z, || i, || j, || k, || u, || v, || w); }
662 662
   // Smallest element
663
-  FI T _min()                                      const { return _MIN(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
663
+  FI T small()                                     const { return _MIN(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
664 664
   // Largest element
665
-  FI T _max()                                      const { return _MAX(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
665
+  FI T large()                                     const { return _MAX(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
666 666
 
667 667
   // Explicit copy and copies with conversion
668 668
   FI XYZEval<T>          copy()  const { XYZEval<T> v = *this; return v; }

Loading…
Annulla
Salva