src/lib/memgfx.c 1.51
1.51 2009/06/20 17:25:10 mikep
remove unnecesary dependence on math:floor()
Index: src/lib/memgfx.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/memgfx.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -b -B -U 4 -r1.50 -r1.51
--- src/lib/memgfx.c 20 Jun 2009 16:08:01 -0000 1.50
+++ src/lib/memgfx.c 20 Jun 2009 17:25:10 -0000 1.51
@@ -10,9 +10,8 @@
#include "localmem.h"
#include "vGfx.h"
#include "vGfxPrivate.h"
#include "colHash.h"
-#include "math.h"
static char const rcsid[] = "$Id$";
#ifndef min3
@@ -843,9 +842,9 @@
if( hsv.s == 0 ) // achromatic (grey)
return (struct rgbColor) {(255*hsv.v+500)/1000, (255*hsv.v+500)/1000, (255*hsv.v+500)/1000};
hsv.h /= 60.0;
-i = (int)floor( hsv.h ); // sector 0 to 5
+i = (int) hsv.h; // floor the floating point value, sector 0 to 5
f = hsv.h - i; // fractional part (distance) from hue
// hsv.v is highest r,g, or b value
// low value is related to saturation
low = hsv.v - (hsv.v * hsv.s / 1000); // lowest r,g, or b value