diff options
author | Iru Cai <mytbk920423@gmail.com> | 2014-04-20 22:09:17 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2014-04-20 22:09:17 +0800 |
commit | b15900a363953591d48366379512795a9422222a (patch) | |
tree | aa5248a9926adbef0cedd7d7dabaf9b157d13f65 /res/script/functions.js | |
parent | 88c98119b6e8d6d30731cd0d3e7fb3f9af5557cb (diff) | |
download | fqterm-b15900a363953591d48366379512795a9422222a.tar.xz |
Add my qz script -- for fun!
2 functions are added to the script engine.
Diffstat (limited to 'res/script/functions.js')
-rw-r--r-- | res/script/functions.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/res/script/functions.js b/res/script/functions.js new file mode 100644 index 0000000..2461774 --- /dev/null +++ b/res/script/functions.js @@ -0,0 +1,6 @@ + +rand=function(n){ //generate a random number b'w 0-(n-1) + var t=Math.random(); + return Math.floor(t*n); +} + |