Ver código fonte

🧑‍💻 Min and max for base types

Scott Lahteine 1 ano atrás
pai
commit
8627d4e5da
1 arquivos alterados com 6 adições e 6 exclusões
  1. 6
    6
      Marlin/src/core/types.h

+ 6
- 6
Marlin/src/core/types.h Ver arquivo

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

Carregando…
Cancelar
Salvar