[open-type] In to_float() take offset as float
This commit is contained in:
parent
9e3bfd9aa1
commit
51a17201a7
|
@ -148,7 +148,7 @@ struct HBFixed : Type
|
|||
static_assert (Type::static_size * 8 > fraction_bits, "");
|
||||
|
||||
HBFixed& operator = (typename Type::type i ) { Type::operator= (i); return *this; }
|
||||
float to_float (int32_t offset = 0) const { return ((int32_t) Type::v + offset) / shift; }
|
||||
float to_float (float offset = 0) const { return ((int32_t) Type::v + offset) / shift; }
|
||||
void set_float (float f) { Type::v = roundf (f * shift); }
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (Type::static_size);
|
||||
|
|
Loading…
Reference in New Issue