Closed Ablu closed 8 years ago
Strange, is this limiting of precision broken?
AttributeLabel {
name: qsTr("Movement speed")
value: limitPrecision(playerAttributes.movementSpeed, 1)
}
See the fix. QML handeled this as typeof number
which is a floating point number.
Well, that's a funny fix. I understand that after the division, floating point inaccuracies may occur again, but why would toString()
hide those inaccuracies while binding to the text of a label doesn't?
Well if you print the number after the division it is still fine. It must be the string conversion somewhere in the qt quick engine. So I just do it in JavaScript.
See the movement speed value