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

Function noiseCylinderHSV8

src/fl/gfx/noise/noise.cpp.hpp:196–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196CHSV noiseCylinderHSV8(float angle, float height, u32 time, float radius) {
197 HSV16 hsv16 = noiseCylinderHSV16(angle, height, time, radius);
198
199 // Scale 16-bit components down to 8-bit using bit shift with rounding
200 // This preserves the relative position in the value range
201 u8 h = (hsv16.h + 128) >> 8;
202 u8 s = (hsv16.s + 128) >> 8;
203 u8 v = (hsv16.v + 128) >> 8;
204
205 return CHSV(h, s, v);
206}
207
208CRGB noiseCylinderCRGB(float angle, float height, u32 time, float radius) {
209 // Convert cylindrical coordinates to cartesian

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 1

noiseCylinderHSV16Function · 0.85

Tested by

no test coverage detected