summaryrefslogtreecommitdiff
path: root/gif-encode/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'gif-encode/util.js')
-rw-r--r--gif-encode/util.js15
1 files changed, 0 insertions, 15 deletions
diff --git a/gif-encode/util.js b/gif-encode/util.js
deleted file mode 100644
index 92d8129..0000000
--- a/gif-encode/util.js
+++ /dev/null
@@ -1,15 +0,0 @@
-function shuffle(a){
- var aa = new Array(a.length);
- aa[0] = a[0];
-
- for (var i = 1; i < a.length; i++) {
- var j = Math.floor( Math.random() * i );
- aa[i] = aa[j];
- aa[j] = a[i];
- }
- return aa;
-}
-function sample(a, n) {
- var aa = shuffle(a);
- return aa.slice(0,n);
-}