colors

extract colors from pictures
git clone git://git.2f30.org/colors
Log | Files | Refs | README | LICENSE

commit 95c32852f2c9c922084ad75a0b05b6fecd226fbe
parent ddc463d601b615f3be787a41e435ccb2a504eb05
Author: sin <sin@2f30.org>
Date:   Fri,  5 Jun 2015 13:59:10 +0100

Round to nearest in distance calculations

Diffstat:
Mcolors.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/colors.c b/colors.c @@ -39,7 +39,7 @@ distance(struct point *p1, struct point *p2) dx = (p1->x - p2->x) * (p1->x - p2->x); dy = (p1->y - p2->y) * (p1->y - p2->y); dz = (p1->z - p2->z) * (p1->z - p2->z); - return sqrtf(dx + dy + dz); + return sqrtf(dx + dy + dz) + 0.5f; } void