From b3d9ffe8107bd7e0989c1fed2e5bdf31037134bb Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 5 Jun 2022 20:38:18 -0500 Subject: begin adding logical map shapes --- src/Util/Util.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Util') 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 }; -- cgit v1.2.1