FastLED
3.9.15
Loading...
Searching...
No Matches
clamp.h
Go to the documentation of this file.
1
2
#pragma once
3
4
#include <
stdint.h
>
5
6
#include "
fl/force_inline.h
"
7
8
namespace
fl
{
9
10
template
<
typename
T>
FASTLED_FORCE_INLINE
T
clamp
(T value, T min, T max) {
11
if
(value < min) {
12
return
min;
13
}
14
if
(value > max) {
15
return
max;
16
}
17
return
value;
18
}
19
20
}
// namespace fl
FASTLED_FORCE_INLINE
#define FASTLED_FORCE_INLINE
Definition
force_inline.h:6
force_inline.h
fl::clamp
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition
clamp.h:10
fl
Implements a simple red square effect for 2D LED grids.
Definition
crgb.h:16
stdint.h
fl
clamp.h
Generated on Sat May 24 2025 22:44:23 for FastLED by
1.13.2