mirror of
https://github.com/gryf/wmaker.git
synced 2026-11-21 14:47:04 +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:
1 parent
1df08cc492
commit
79a95d7173
8 files changed
+31
-31
No files matched your search
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user