diff options
Diffstat (limited to 'js/util.js')
| -rw-r--r-- | js/util.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -29,7 +29,7 @@ function pow(n,b) { return Math.pow(n,b) } function exp(n) { return Math.exp(n) } function log(n){ return Math.log(n) } function ln(n){ return Math.log(n)/LN10 } -function sqrt(n) { return Math.sqrt(n,b) } +function sqrt(n) { return Math.sqrt(n) } function cos(n){ return Math.cos(n) } function sin(n){ return Math.sin(n) } function tan(n){ return Math.tan(n) } @@ -70,8 +70,9 @@ function step(a, b){ // ^^ bool -> int } + function julestep (a,b,n) { - return clamp((n - a) / (b - a), 0.0, 1.0); + return clamp(norm(n,a,b), 0.0, 1.0); } // hermite curve apparently |
