renaissance1: #i107215# Fixed wrong rounding in HSBtoRGB.

This commit is contained in:
Andre Fischer 2010-06-14 18:00:56 +02:00
parent a2e79b9f10
commit cd4385a9ae

View file

@ -244,8 +244,8 @@ ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
f = dH - n;
UINT8 a = (UINT8) ( nB * ( 100 - nSat ) / 100 );
UINT8 b = (UINT8) ( nB * ( 100 - ( (double)nSat * f + 0.5 ) ) / 100 );
UINT8 c = (UINT8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) + 0.5 ) ) / 100 );
UINT8 b = (UINT8) ( nB * ( 100 - ( (double)nSat * f ) ) / 100 );
UINT8 c = (UINT8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) ) ) / 100 );
switch( n )
{