FastLED
3.9.15
Loading...
Searching...
No Matches
◆
mapToIndex()
[2/2]
template<typename IntType, typename = fl::enable_if_t<!fl::is_integral<IntType>::value>>
u16 fl::XYMap::mapToIndex
(
IntType
x
,
IntType
y
) const
inline
Definition at line
95
of file
xymap.h
.
95
{
96
x
=
fl::clamp<int>
(
x
, 0,
width
- 1);
97
y
=
fl::clamp<int>
(
y
, 0,
height
- 1);
98
return
mapToIndex
((u16)
x
, (u16)
y
);
99
}
y
int y
Definition
simple.h:93
x
int x
Definition
simple.h:92
XYMap::width
u16 width
Definition
xymap.h:127
XYMap::mapToIndex
u16 mapToIndex(const u16 &x, const u16 &y) const
Definition
xymap.cpp:95
XYMap::height
u16 height
Definition
xymap.h:128
fl::clamp
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition
clamp.h:10
XYMap
Generated on Sat Sep 20 2025 20:42:22 for FastLED by
1.13.2