1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 22:04:12 +01:00

Fixed floating point constants defined as double but expected as float

To preserve the accuracy of the operation, the C standard request that the
mathematical operation is performed using double precision, but in many
case this is not necessary so this patch fixes a few constants to avoid
that conversion.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2015-05-24 15:49:06 +02:00
committed by Carlos R. Mafra
parent 1df08cc492
commit 79a95d7173
8 changed files with 31 additions and 31 deletions

View File

@@ -47,7 +47,7 @@ void RCombineAlpha(unsigned char *d, unsigned char *s, int s_has_alpha,
cratio = 0;
} else {
ratio = (float)sa / alpha;
cratio = 1.0 - ratio;
cratio = 1.0F - ratio;
}
*d = (int)*d * cratio + (int)*s * ratio;