FastLED 3.9.15
Loading...
Searching...
No Matches

◆ Tile2x2_u8_wrap() [3/3]

fl::Tile2x2_u8_wrap::Tile2x2_u8_wrap ( const Tile2x2_u8 & from,
uint16_t width,
uint16_t height )

Definition at line 71 of file tile2x2.cpp.

72 {
73 const vec2i16 origin = from.origin();
74 at(0, 0) = {wrap(vec2i16(origin.x, origin.y), vec2i16(width, height)),
75 from.at(0, 0)};
76 at(0, 1) = {wrap(vec2i16(origin.x, origin.y + 1), vec2i16(width, height)),
77 from.at(0, 1)};
78 at(1, 0) = {wrap(vec2i16(origin.x + 1, origin.y), vec2i16(width, height)),
79 from.at(1, 0)};
80 at(1,
81 1) = {wrap(vec2i16(origin.x + 1, origin.y + 1), vec2i16(width, height)),
82 from.at(1, 1)};
83}
Data & at(uint16_t x, uint16_t y)
Definition tile2x2.cpp:57
static vec2i16 wrap(const vec2i16 &v, const vec2i16 &size)
Definition tile2x2.cpp:14
vec2< int16_t > vec2i16
Definition geometry.h:320

References fl::Tile2x2_u8::at(), at(), fl::Tile2x2_u8::origin(), fl::vec2< T >::x, and fl::vec2< T >::y.

+ Here is the call graph for this function: