diff options
author | Seth Troisi <sethtroisi@google.com> | 2021-06-03 05:00:17 +0300 |
---|---|---|
committer | Seth Troisi <sethtroisi@google.com> | 2021-06-03 05:29:52 +0300 |
commit | dfc3788b146d77059806cd24e66e7499693df7b9 (patch) | |
tree | a1a3b92c770ec3e947cc6739acae146477031314 | |
parent | cfffa1351497425931fb9ef5bad0eeb7b0cf8645 (diff) |
Add scale8(uint8)
-rw-r--r-- | src/pixeltypes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pixeltypes.h b/src/pixeltypes.h index 6e91723d..addaafff 100644 --- a/src/pixeltypes.h +++ b/src/pixeltypes.h @@ -353,6 +353,14 @@ struct CRGB { } /// return a CRGB object that is a scaled down version of this object + inline CRGB scale8 (uint8_t scaledown ) const + { + CRGB out = *this; + nscale8x3( out.r, out.g, out.b, scaledown); + return out; + } + + /// return a CRGB object that is a scaled down version of this object inline CRGB scale8 (const CRGB & scaledown ) const { CRGB out; |