Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Min and max for base types
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 16, 2022
1 parent 505f0a6 commit 1a6f9da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ struct XYval {
// If any element is true then it's true
FI operator bool() { return x || y; }
// Smallest element
FI T _min() const { return _MIN(x, y); }
FI T small() const { return _MIN(x, y); }
// Largest element
FI T _max() const { return _MAX(x, y); }
FI T large() const { return _MAX(x, y); }

// Explicit copy and copies with conversion
FI XYval<T> copy() const { return *this; }
Expand Down Expand Up @@ -505,9 +505,9 @@ struct XYZval {
// If any element is true then it's true
FI operator bool() { return NUM_AXIS_GANG(x, || y, || z, || i, || j, || k, || u, || v, || w); }
// Smallest element
FI T _min() const { return _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }
FI T small() const { return _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }
// Largest element
FI T _max() const { return _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }
FI T large() const { return _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)); }

// Explicit copy and copies with conversion
FI XYZval<T> copy() const { XYZval<T> o = *this; return o; }
Expand Down Expand Up @@ -660,9 +660,9 @@ struct XYZEval {
// If any element is true then it's true
FI operator bool() { return 0 LOGICAL_AXIS_GANG(|| e, || x, || y, || z, || i, || j, || k, || u, || v, || w); }
// Smallest element
FI T _min() const { return _MIN(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
FI T small() const { return _MIN(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
// Largest element
FI T _max() const { return _MAX(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
FI T large() const { return _MAX(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }

// Explicit copy and copies with conversion
FI XYZEval<T> copy() const { XYZEval<T> v = *this; return v; }
Expand Down

0 comments on commit 1a6f9da

Please sign in to comment.