1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-13 12:25:53 +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

@@ -506,7 +506,7 @@ static void updateScrollerProportion(ScrollView * sPtr)
prop = (float)sPtr->viewport->size.width / (float)sPtr->contentView->size.width;
if (oldP < 1.0)
if (oldP < 1.0F)
value = (prop * oldV) / oldP;
else
value = 0;
@@ -518,7 +518,7 @@ static void updateScrollerProportion(ScrollView * sPtr)
prop = (float)sPtr->viewport->size.height / (float)sPtr->contentView->size.height;
if (oldP < 1.0)
if (oldP < 1.0F)
value = (prop * oldV) / oldP;
else
value = 0;