LCOV - code coverage report
Current view: top level - src/AH/Math - MinMaxFix.hpp (source / functions) Hit Total Coverage
Test: 00f463b534fbea22f0b596e091a60715679e3064 Lines: 2 2 100.0 %
Date: 2024-11-03 16:33:35 Functions: 1 1 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             : constexpr auto max(const T &a, const U &b) -> decltype(a < b ? b : a) {
      20             :     return a < b ? b : a;
      21             : }
      22             : 
      23             : END_AH_NAMESPACE

Generated by: LCOV version 1.15