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

Generated by: LCOV version 1.15