renaissance1: #i107215# Fixed wrong rounding in HSBtoRGB.
This commit is contained in:
parent
a2e79b9f10
commit
cd4385a9ae
1 changed files with 2 additions and 2 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue