LCOV - code coverage report
Current view: top level - src/AH/Math - MinMaxFix.hpp (source / functions) Hit Total Coverage
Test: 169c36a3797bc662d84b5726f34a3f37d3c58247 Lines: 4 4 100.0 %
Date: 2024-11-09 15:32:27 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <AH/Math/FixArduinoMacros.hpp>
       4             : 
       5             : #include <AH/Settings/NamespaceSettings.hpp>
       6             : 
       7             : BEGIN_AH_NAMESPACE
       8             : 
       9             : /// Return the smaller of two numbers/objects.
      10             : /// @ingroup    AH_Math
      11             : template <class T, class U>
      12     1000003 : constexpr auto min(const T &a, const U &b) -> decltype(b < a ? b : a) {
      13     1000003 :     return b < a ? b : a;
      14             : }
      15             : 
      16             : /// Return the larger of two numbers/objects.
      17             : /// @ingroup    AH_Math
      18             : template <class T, class U>
      19        5240 : constexpr auto max(const T &a, const U &b) -> decltype(a < b ? b : a) {
      20        5240 :     return a < b ? b : a;
      21             : }
      22             : 
      23             : END_AH_NAMESPACE

Generated by: LCOV version 1.15