m[algs] Move roundf() here
This commit is contained in:
parent
f0947717ff
commit
cba9893ac5
|
@ -150,6 +150,12 @@ struct BEInt<Type, 4>
|
|||
private: uint8_t v[4];
|
||||
};
|
||||
|
||||
/* Floats. */
|
||||
|
||||
/* We want our rounding towards +infinity. */
|
||||
static inline float
|
||||
_hb_roundf (float x) { return floorf (x + .5f); }
|
||||
#define roundf(x) _hb_roundf(x)
|
||||
|
||||
|
||||
/* Encodes three unsigned integers in one 64-bit number. If the inputs have more than 21 bits,
|
||||
|
@ -165,6 +171,7 @@ struct BEInt<Type, 4>
|
|||
#define HB_CODEPOINT_DECODE3_11_7_14_2(v) ((hb_codepoint_t) (((v) >> 14) & 0x007Fu) | 0x0300)
|
||||
#define HB_CODEPOINT_DECODE3_11_7_14_3(v) ((hb_codepoint_t) (v) & 0x3FFFu)
|
||||
|
||||
|
||||
struct
|
||||
{
|
||||
/* Note. This is dangerous in that if it's passed an rvalue, it returns rvalue-reference. */
|
||||
|
|
|
@ -448,11 +448,6 @@ static_assert ((sizeof (hb_mask_t) == 4), "");
|
|||
static_assert ((sizeof (hb_var_int_t) == 4), "");
|
||||
|
||||
|
||||
static inline float
|
||||
_hb_roundf (float x) { return floorf (x + .5f); }
|
||||
#define roundf(x) _hb_roundf(x)
|
||||
|
||||
|
||||
/*
|
||||
* For lack of a better place, put Zawgyi script hack here.
|
||||
* https://github.com/harfbuzz/harfbuzz/issues/1162
|
||||
|
|
Loading…
Reference in New Issue