Fixes to light-level detection code.

This commit is contained in:
Dmitry 2019-05-10 13:51:09 +03:00 committed by jeefo
commit fbd42b92d1
6 changed files with 96 additions and 57 deletions

View file

@ -371,7 +371,11 @@ public:
}
inline int avg (void) const {
return (red + green + blue) / (sizeof (SimpleColor) / sizeof (int));
return sum () / (sizeof (SimpleColor) / sizeof (int));
}
inline int sum (void) const {
return red + green + blue;
}
};