[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);
|
v = (v - axis.default_value) / (axis.default_value - axis.min_value);
|
||||||
else
|
else
|
||||||
v = (v - axis.default_value) / (axis.max_value - axis.default_value);
|
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; }
|
unsigned int get_instance_count () const { return instanceCount; }
|
||||||
|
Loading…
Reference in New Issue
Block a user