mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-29 14:19:51 -04:00
round number settings to 5 decimal places
This commit is contained in:
parent
ae129933a7
commit
c9dbc4b82e
1 changed files with 2 additions and 1 deletions
|
@ -177,7 +177,8 @@ protected:
|
|||
}
|
||||
|
||||
if (invoker != m_input) {
|
||||
m_input->setString(numToString(this->getValue()));
|
||||
// round to 5 decimal places to avoid floating point errors
|
||||
m_input->setString(numToString(round(this->getValue() * 100000.0) / 100000.0));
|
||||
}
|
||||
|
||||
auto min = this->getSetting()->getMinValue();
|
||||
|
|
Loading…
Add table
Reference in a new issue