Use roundf() as suggested by Axel
This commit is contained in:
parent
8835205cf6
commit
17aed1bfc8
@ -625,10 +625,9 @@ BMenuField::Alignment() const
|
|||||||
void
|
void
|
||||||
BMenuField::SetDivider(float position)
|
BMenuField::SetDivider(float position)
|
||||||
{
|
{
|
||||||
position = floorf(position + 0.5);
|
position = roundf(position);
|
||||||
|
|
||||||
float delta = fDivider - position;
|
float delta = fDivider - position;
|
||||||
|
|
||||||
if (delta == 0.0f)
|
if (delta == 0.0f)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user