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

Function noiseRingHSV8

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

Source from the content-addressed store, hash-verified

49}
50
51CHSV noiseRingHSV8(float angle, u32 time, float radius) {
52 fl::HSV16 hsv16 = noiseRingHSV16(angle, time, radius);
53
54 // Scale 16-bit components down to 8-bit using bit shift with rounding
55 // This preserves the relative position in the value range
56 u8 h = (hsv16.h + 128) >> 8;
57 u8 s = (hsv16.s + 128) >> 8;
58 u8 v = (hsv16.v + 128) >> 8;
59
60 return CHSV(h, s, v);
61}
62
63CRGB noiseRingCRGB(float angle, u32 time, float radius) {
64 // Convert angle to cartesian coordinates

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 1

noiseRingHSV16Function · 0.85

Tested by

no test coverage detected