mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 09:13:08 +03:00
If percentage is negative, resort to floating point.
svn path=/trunk/netsurf/; revision=11700
This commit is contained in:
parent
8912285839
commit
06e6ec4eb1
@ -59,7 +59,9 @@
|
||||
#define AUTO INT_MIN
|
||||
|
||||
/* Fixed point value percentage of an integer, to an integer */
|
||||
#define FPCT_OF_INT_TOINT(a, b) FIXTOINT(FDIVI(FMULI(a, b), 100))
|
||||
#define FPCT_OF_INT_TOINT(a, b) (a < 0) ? \
|
||||
(FIXTOFLT(a) * b) / 100 : \
|
||||
FIXTOINT(FDIVI(FMULI(a, b), 100))
|
||||
|
||||
|
||||
static bool layout_block_context(struct box *block, int viewport_height,
|
||||
|
Loading…
Reference in New Issue
Block a user