mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Simplify normalization formula.
This commit is contained in:
parent
c14539d63a
commit
1a189ba4f5
2 changed files with 2 additions and 10 deletions
|
@ -68,11 +68,7 @@ Item {
|
|||
}
|
||||
|
||||
function normalizeValue(value) {
|
||||
if (value > sliderRoot.maximumValue)
|
||||
return sliderRoot.maximumValue
|
||||
else if (value < sliderRoot.minimumValue)
|
||||
return sliderRoot.minimumValue
|
||||
return value
|
||||
return Math.min(Math.max(value, sliderRoot.minimumValue), sliderRoot.maximumValue)
|
||||
}
|
||||
|
||||
// slider track
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue