summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/shader.js2
-rw-r--r--js/util.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/js/shader.js b/js/shader.js
index d203abe..55bb2c7 100644
--- a/js/shader.js
+++ b/js/shader.js
@@ -8,8 +8,8 @@ var shader = (function(){
exports.build(demo_shader.innerHTML)
}
exports.build = function (fn_str){
- new_fn = new Function('lex', 'x', 'y', 'w', 'h', 't', fn_str)
try {
+ new_fn = new Function('lex', 'x', 'y', 'w', 'h', 't', fn_str)
new_fn(lex, 0, 0, 1, 1, 0)
}
catch (e) {
diff --git a/js/util.js b/js/util.js
index fac0faf..27c5427 100644
--- a/js/util.js
+++ b/js/util.js
@@ -36,7 +36,7 @@ function tan(n){ return Math.tan(n) }
function acos(n){ return Math.cos(n) }
function asin(n){ return Math.sin(n) }
function atan(n){ return Math.atan(n) }
-function atan2(n){ return Math.atan2(n) }
+function atan2(a,b){ return Math.atan2(a,b) }
function sec(n){ return 1/cos(n) }
function csc(n){ return 1/sin(n) }
function cot(n){ return 1/tan(n) }