Speeduino
Loading...
Searching...
No Matches
minmax.h
Go to the documentation of this file.
1
9#pragma once
10
11#if !defined(ARDUINO_ARCH_STM32)
12
13#undef max
14
15template<typename _Tp>
16constexpr const _Tp& max(const _Tp& __a, const _Tp& __b) {
17 if (__b > __a) {
18 return __b;
19 }
20 return __a;
21}
22#endif
23
24#if !defined(ARDUINO_ARCH_STM32)
25
26#undef min
27
28template<typename _Tp>
29constexpr const _Tp& min(const _Tp& __a, const _Tp& __b) {
30 if (__b < __a) {
31 return __b;
32 }
33 return __a;
34}
35
36#endif
constexpr const _Tp & max(const _Tp &__a, const _Tp &__b)
Definition minmax.h:16
constexpr const _Tp & min(const _Tp &__a, const _Tp &__b)
Definition minmax.h:29