FastLED
3.9.15
Loading...
Searching...
No Matches
◆
mapToIndex()
[2/2]
template<typename IntType, typename = fl::enable_if_t<!fl::is_integral<IntType>::value>>
uint16_t fl::XYMap::mapToIndex
(
IntType
x
,
IntType
y
) const
inline
Definition at line
89
of file
xymap.h
.
89
{
90
x
=
fl::clamp<int>
(
x
, 0,
width
- 1);
91
y
=
fl::clamp<int>
(
y
, 0,
height
- 1);
92
return
mapToIndex
((uint16_t)
x
, (uint16_t)
y
);
93
}
x
uint32_t x[NUM_LAYERS]
Definition
Fire2023.ino:82
y
uint32_t y[NUM_LAYERS]
Definition
Fire2023.ino:83
XYMap::width
uint16_t width
Definition
xymap.h:121
XYMap::mapToIndex
uint16_t mapToIndex(const uint16_t &x, const uint16_t &y) const
Definition
xymap.cpp:97
XYMap::height
uint16_t height
Definition
xymap.h:122
fl::clamp
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition
clamp.h:10
XYMap
Generated on Sat May 24 2025 22:44:24 for FastLED by
1.13.2