From a1e08c0be1a1067232ea71ed3344ce44d9522bf7 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Mon, 9 Sep 2019 23:17:50 -0400 Subject: added center alignment for text using ^^ --- src/client/util/clamp.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/client/util/clamp.js (limited to 'src/client/util/clamp.js') 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 -- cgit v1.2.3-70-g09d2