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

Method FlowFieldFloat

src/fl/fx/2d/flowfield.cpp.hpp:118–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116// ---------------------------------------------------------------------------
117
118FlowFieldFloat::FlowFieldFloat(const XYMap &xyMap, const Params &params)
119 : FlowField(xyMap, params) {
120 int w = (int)getWidth();
121 int h = (int)getHeight();
122 int n = w * h;
123
124 mR.resize(n, 0.0f);
125 mG.resize(n, 0.0f);
126 mB.resize(n, 0.0f);
127 mTR.resize(n, 0.0f);
128 mTG.resize(n, 0.0f);
129 mTB.resize(n, 0.0f);
130 mXProf.resize(w, 0.0f);
131 mYProf.resize(h, 0.0f);
132
133 mNoiseGenX.init(42);
134 mNoiseGenY.init(1337);
135}
136
137float FlowFieldFloat::fmodPos(float x, float m) {
138 float r = fmodf(x, m);

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected