From 5bc2eb22e9a62d41136a377083436d399c37d838 Mon Sep 17 00:00:00 2001 From: Jason Stallings Date: Thu, 23 Jul 2015 11:46:56 -0500 Subject: [PATCH] These throw errors, need to come back to this. --- src/rgb.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rgb.h b/src/rgb.h index f7e032fe..8b931714 100644 --- a/src/rgb.h +++ b/src/rgb.h @@ -78,9 +78,9 @@ H_INLINE int MMRGBColorSimilarToColor(MMRGBColor c1, MMRGBColor c2, uint8_t d1 = c1.red - c2.red; uint8_t d2 = c1.green - c2.green; uint8_t d3 = c1.blue - c2.blue; - return sqrt((d1 * d1) + + /*return sqrt((d1 * d1) + (d2 * d2) + - (d3 * d3)) <= (tolerance * 442.0f); + (d3 * d3)) <= (tolerance * 442.0f);*/ } } @@ -94,9 +94,9 @@ H_INLINE int MMRGBHexSimilarToColor(MMRGBHex h1, MMRGBHex h2, float tolerance) uint8_t d1 = RED_FROM_HEX(h1) - RED_FROM_HEX(h2); uint8_t d2 = GREEN_FROM_HEX(h1) - GREEN_FROM_HEX(h2); uint8_t d3 = BLUE_FROM_HEX(h1) - BLUE_FROM_HEX(h2); - return sqrt((d1 * d1) + + /*return sqrt((d1 * d1) + (d2 * d2) + - (d3 * d3)) <= (tolerance * 442.0f); + (d3 * d3)) <= (tolerance * 442.0f);*/ } }