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

Method rainbow

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

Source from the content-addressed store, hash-verified

153}
154
155CRGB FlowFieldFloat::rainbow(float t, float speed, float phase) {
156 float hue = fmodPos(t * speed + phase, 1.0f);
157 CHSV hsv((u8)(hue * 255.0f), 255, 255);
158 CRGB rgb;
159 hsv2rgb_rainbow(hsv, rgb);
160 return rgb;
161}
162
163void FlowFieldFloat::drawDot(float cx, float cy, float diam,
164 u8 cr, u8 cg, u8 cb) {

Callers

nothing calls this directly

Calls 6

hsv2rgb_rainbowFunction · 0.85
modFunction · 0.85
clampFunction · 0.85
s16x16Class · 0.50
rawMethod · 0.45
to_intMethod · 0.45

Tested by

no test coverage detected