summaryrefslogtreecommitdiff
path: root/Pixel.h
diff options
context:
space:
mode:
Diffstat (limited to 'Pixel.h')
-rw-r--r--Pixel.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/Pixel.h b/Pixel.h
index 55a684f..2acb9db 100644
--- a/Pixel.h
+++ b/Pixel.h
@@ -31,14 +31,9 @@ struct Pixel
unsigned char r;
unsigned char a;
- int isBlack(int threshold = 3) {
-
- if (r > threshold || g > threshold || b > threshold) {
- return false;
- }
- return true;
+ inline int isBlack(int threshold) {
+ return (r < threshold || g < threshold || b < threshold);
}
-
};
#endif \ No newline at end of file