* src/base/ftcalc.c (FT_RoundFix): Improve.

This commit is contained in:
Alexei Podtelezhnikov 2015-09-09 21:30:15 -04:00
parent 4d406e3907
commit 09948e426e
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftcalc.c (FT_RoundFix): Improve.
2015-09-09 Wojciech Mamrak <wmamrak@gmail.com>
* src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.

View File

@ -86,8 +86,7 @@
FT_EXPORT_DEF( FT_Fixed )
FT_RoundFix( FT_Fixed a )
{
return a >= 0 ? ( a + 0x8000L ) & ~0xFFFFL
: -((-a + 0x8000L ) & ~0xFFFFL );
return ( a + 0x8000L - ( a < 0 ) ) & ~0xFFFFL;
}