Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2021-06-03 05:00:17 +0300
committerSeth Troisi <sethtroisi@google.com>2021-06-03 05:29:52 +0300
commitdfc3788b146d77059806cd24e66e7499693df7b9 (patch)
treea1a3b92c770ec3e947cc6739acae146477031314
parentcfffa1351497425931fb9ef5bad0eeb7b0cf8645 (diff)
Add scale8(uint8)
-rw-r--r--src/pixeltypes.h8
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;