Updated demo, moved "adapt" controller into function

This commit is contained in:
euvl
2017-05-01 14:33:41 +03:00
parent f518f5849e
commit 393ea38104
5 changed files with 43 additions and 19 deletions

View File

@@ -1,9 +1,11 @@
export const inRange = (from, to, value) => {
if (value > to) {
return to
}
if (value < from) {
return from
}
if (value > to) {
return to
}
return value
}