Files
CuboBmsTool/qml/Utils/MathHelper.qml

10 lines
219 B
QML

pragma Singleton
import QtQuick 2.12
QtObject {
function roundDouble(value, decimals = 2) {
var factor = Math.pow(10, decimals)
return Math.round((value + Number.EPSILON) * factor) / factor
}
}