Various changes have been made as a result of the discussion of the first version

This commit is contained in:
Yury Shuvakin
2022-09-09 16:36:44 +03:00
parent 1fc06361f8
commit 3d0f39f846
13 changed files with 259 additions and 68 deletions

View File

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