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

Function scale_hd_channel

src/fl/gfx/colorutils.cpp.hpp:289–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289inline fl::u16 scale_hd_channel(fl::u16 channel, fl::u8x8 scale) {
290 const fl::u32 scaled =
291 (static_cast<fl::u32>(channel) * scale.raw()) >> 8;
292 return scaled > 0xFFFFu ? fl::u16(0xFFFF) : static_cast<fl::u16>(scaled);
293}
294
295inline void scale_rgb_hd(CRGB16 &rgb, fl::u8x8 brightness) {
296 if (brightness.raw() == 256) {

Callers 1

scale_rgb_hdFunction · 0.85

Calls 1

rawMethod · 0.45

Tested by

no test coverage detected