diff options
Diffstat (limited to 'src/Util')
-rw-r--r-- | src/Util/Util.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Util/Util.js b/src/Util/Util.js index 165d1d0..88ed59f 100644 --- a/src/Util/Util.js +++ b/src/Util/Util.js @@ -17,4 +17,13 @@ function clamp(value, min, max) { function lerp(a, b, alpha) { return ((1-alpha)*a) + (alpha*b); } -export { useAverage, clamp, lerp }; + +class Enum { + constructor(prefix, name) { + this.prefix = prefix; + this.name = name; + } + toString() { return `${this.prefix}.${this.name}`; } +} + +export { useAverage, clamp, lerp, Enum }; |