rem: sat = rint(255.0 * sqrtf( (float)(xcor*xcor) + (float)(ycor*ycor)) / (float)colorWheelSize);
add: sat = rint(255.0 * sqrt(xcor*xcor + ycor*ycor) / colorWheelSize);
context: wheelInitMatrix(W_ColorPanel *panel){    int			i;    int			x,y;    unsigned char	*rp, *gp, *bp;    CPColor		cpColor;    long		ofs[4];    int			xcor, ycor;    unsigned short	sat;    int			dhue[4];    const int		cw_halfsize = (colorWheelSize + 4)/2,			cw_sqsize = (colorWheelSize +4) * (colorWheelSize +4),			uchar_shift = getShift(sizeof(unsigned char));        if (!panel->wheelMtrx)	return;        cpColor.hsv.value = 255;    cpColor.set = cpHSV;        ofs[0] = -1;    ofs[1] = -(colorWheelSize + 4);	        /* offsets are counterclockwise (in triangles).     *      *     ofs[0] ---->     *      _______________________________________     * [1] |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|  o     *  s  |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|  f     *  f  |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|  s     *  o  | | | | | | | | | | | | | | | | | | | | | [3]     *     *                                  <---- ofs[2]     *       ____     *      |\  /| <-- triangles     *      | \/ |     *      | /\ |     *      |/__\|     */	        for (y = 0; y < cw_halfsize; y++) {	for (x = y; x < (colorWheelSize+4-y); x++) {	    /* (xcor, ycor) is (x,y) relative to center of matrix */	    xcor = 2 * x - 4 - colorWheelSize;	    ycor = 2 * y - 4 - colorWheelSize;	    /* RColor.saturation is unsigned char and will wrap after 255 */	    sat = rint(255.0 *			sqrtf( (float)(xcor*xcor) + (float)(ycor*ycor)) /			(float)colorWheelSize);	    	    cpColor.hsv.saturation = (unsigned char)sat;	    	    ofs[0]++;				/* top quarter of matrix*/	    ofs[1] += colorWheelSize + 4;	/* left quarter */    	    ofs[2] = cw_sqsize - 1 - ofs[0];	/* bottom quarter */	    ofs[3] = cw_sqsize - 1 - ofs[1];	/* right quarter */	    	    if (sat < 256) {		if (xcor != 0)		    dhue[0] = rint(atan((float)ycor / (float)xcor) *			    (180.0 / M_PI)) + (xcor < 0 ? 180.0 : 0.0);		else		    dhue[0] = 270;				dhue[0] = 360 - dhue[0];  /* Reverse direction of ColorWheel */		dhue[1] = 270 - dhue[0] + (dhue[0] > 270 ? 360 : 0);		dhue[2] = dhue[0] - 180 + (dhue[0] < 180 ? 360 : 0);		dhue[3] = 90 - dhue[0]  + (dhue[0] > 90  ? 360 : 0);				for (i = 0; i < 4; i++) {		    rp = panel->wheelMtrx->data[0] + (ofs[i] << uchar_shift);		    gp = panel->wheelMtrx->data[1] + (ofs[i] << uchar_shift);		    bp = panel->wheelMtrx->data[2] + (ofs[i] << uchar_shift);		    		    cpColor.hsv.hue = dhue[i];		    convertCPColor(&cpColor);		    		    *rp = (unsigned char)(cpColor.rgb.red);		    *gp = (unsigned char)(cpColor.rgb.green);		    *bp = (unsigned char)(cpColor.rgb.blue);		}	    }	    else {		for (i = 0; i < 4; i++) {		    rp = panel->wheelMtrx->data[0] + (ofs[i] << uchar_shift);		    gp = panel->wheelMtrx->data[1] + (ofs[i] << uchar_shift);		    bp = panel->wheelMtrx->data[2] + (ofs[i] << uchar_shift);		    		    *rp = (unsigned char)0;		    *gp = (unsigned char)0;		    *bp = (unsigned char)0;		}	    }	}		ofs[0] += 2*y+1;	ofs[1] += 1 - (colorWheelSize + 4) * (colorWheelSize + 4 - 1 - 2*y);    }}