mirror of
https://gitee.com/openharmony/third_party_harfbuzz
synced 2024-11-23 15:20:41 +00:00
[fvar] Use roundf instead hardcoding round logic
This commit is contained in:
parent
60485ab047
commit
1f926fb2b6
@ -237,7 +237,7 @@ struct fvar
|
||||
v = (v - axis.default_value) / (axis.default_value - axis.min_value);
|
||||
else
|
||||
v = (v - axis.default_value) / (axis.max_value - axis.default_value);
|
||||
return (int) (v * 16384.f + (v >= 0.f ? .5f : -.5f));
|
||||
return roundf (v * 16384.f);
|
||||
}
|
||||
|
||||
unsigned int get_instance_count () const { return instanceCount; }
|
||||
|
Loading…
Reference in New Issue
Block a user