LCOV - code coverage report
Current view: top level - src/AH/Math - MinMaxFix.hpp (source / functions) Hit Total Coverage
Test: e224b347cd670555e44f06608ac41bd1ace9d9d8 Lines: 4 4 100.0 %
Date: 2020-09-08 17:44:46 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14-6-g40580cd