diff options
author | andrewdkim <adkim414@gmail.com> | 2019-09-15 17:00:46 -0400 |
---|---|---|
committer | andrewdkim <adkim414@gmail.com> | 2019-09-15 17:00:46 -0400 |
commit | 7dba132c37b0f4402e375d95c068a5fe31904a1f (patch) | |
tree | cd4ab0558f6b599cf685f99e542f24d86328e0cc /src/client/util/clamp.js | |
parent | c7678db105f952e7562f1b573266fb295e13cf7b (diff) | |
parent | 143d4669e764f6967d4d826b00b29912892ca637 (diff) |
new changes + pull from master
Diffstat (limited to 'src/client/util/clamp.js')
-rw-r--r-- | src/client/util/clamp.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client/util/clamp.js b/src/client/util/clamp.js new file mode 100644 index 000000000..9c7fd78a4 --- /dev/null +++ b/src/client/util/clamp.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = clamp; +function clamp(min, val, max) { + if (val < min) { + return min; + } + if (val > max) { + return max; + } + return val; +}
\ No newline at end of file |