| 194 | } |
| 195 | |
| 196 | CHSV 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 | |
| 208 | CRGB noiseCylinderCRGB(float angle, float height, u32 time, float radius) { |
| 209 | // Convert cylindrical coordinates to cartesian |
no test coverage detected