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

◆ Tile2x2_u8_wrap() [2/3]

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

Definition at line 48 of file tile2x2.cpp.

48 {
49 const vec2i16 origin = from.origin();
50 at(0, 0) = {wrap_x(vec2i16(origin.x, origin.y), width), from.at(0, 0)};
51 at(0, 1) = {wrap_x(vec2i16(origin.x, origin.y + 1), width), from.at(0, 1)};
52 at(1, 0) = {wrap_x(vec2i16(origin.x + 1, origin.y), width), from.at(1, 0)};
53 at(1, 1) = {wrap_x(vec2i16(origin.x + 1, origin.y + 1), width),
54 from.at(1, 1)};
55}
Data & at(uint16_t x, uint16_t y)
Definition tile2x2.cpp:57
static vec2i16 wrap_x(const vec2i16 &v, const uint16_t width)
Definition tile2x2.cpp:19
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: