summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/util.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/util.js b/js/util.js
index d775ca1..e0b7166 100644
--- a/js/util.js
+++ b/js/util.js
@@ -14,6 +14,7 @@ var PI = Math.PI
var PHI = (1+Math.sqrt(5))/2
var TWO_PI = PI*2
function clamp(n,a,b){ return n<a?a:n<b?n:b }
+function norm(n,a,b){ return (n-a) / (b-a) }
function lerp(n,a,b){ return (b-a)*n+a }
function mix(n,a,b){ return a*(1-n)+b*n }
function ceil(n){ return Math.ceil(n) }