MCPcopy Create free account
hub / github.com/FastLED/FastLED / addOffset

Method addOffset

src/fl/math/screenmap.cpp.hpp:616–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616void ScreenMap::addOffset(const vec2f &p) {
617 vec2f *data = mLookUpTable->getDataMutable();
618 for (u32 i = 0; i < length; i++) {
619 vec2f &curr = data[i];
620 curr.x += p.x;
621 curr.y += p.y;
622 }
623}
624
625ScreenMap& ScreenMap::addOffsetX(float x) { addOffset({x, 0}); return *this; }
626ScreenMap& ScreenMap::addOffsetY(float y) { addOffset({0, y}); return *this; }

Callers

nothing calls this directly

Calls 1

getDataMutableMethod · 0.80

Tested by

no test coverage detected