Create RGB.h

This commit is contained in:
xixu-me committed 2024-10-01 21:04:04 +08:00
1 parent cc50442bec
commit 031e019261
1 file changed
+24
+24
View File
@@ -0,0 +1,24 @@
#pragma once
class CRGB {
public:
CRGB();
CRGB(double, double, double);
virtual ~CRGB();
friend CRGB operator+(const CRGB &, const CRGB &);
friend CRGB operator-(const CRGB &, const CRGB &);
friend CRGB operator*(const CRGB &, const CRGB &);
friend CRGB operator*(const CRGB &, double);
friend CRGB operator*(double, const CRGB &);
friend CRGB operator/(const CRGB &, double);
friend CRGB operator+=(CRGB &, CRGB &);
friend CRGB operator-=(CRGB &, CRGB &);
friend CRGB operator*=(CRGB &, CRGB &);
friend CRGB operator/=(CRGB &, double);
void Normalize();
public:
double red;
double green;
double blue;
};