From 6e8d18baedbe84ce2bb776a142dd08d27a6a4f38 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 1 Jan 2012 12:13:12 +0000 Subject: [PATCH] Fix error in volume computation that led to weird results. Fixes all problems reported by DawnBringer :). git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1885 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/op_c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/op_c.c b/src/op_c.c index b99a8400..1f46666f 100644 --- a/src/op_c.c +++ b/src/op_c.c @@ -436,9 +436,9 @@ ENDCRUSH: c->bmin=bmin; c->bmax=bmax; // Find the longest axis to know which way to split the cluster - r=(c->rmax-c->rmin); - g=(c->vmax-c->vmin); - b=(c->bmax-c->bmin); + r=(c->rmax-c->rmin) + 1; + g=(c->vmax-c->vmin) + 1; + b=(c->bmax-c->bmin) + 1; c->data.cut.volume = r*g*b;