summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-03-29 23:54:00 +0200
committerJules Laplace <jules@okfoc.us>2017-03-29 23:54:00 +0200
commitdbb4236232e79d492f1d5d9ca2fd01dca44e81fe (patch)
tree0e5b20ef8862c7689684dfc97012d3ac41afeae2
parent8f42f75b29ce3508a2e6e747da95b206c2cf8901 (diff)
no decimal dither
-rw-r--r--js/dither.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/js/dither.js b/js/dither.js
index d3340dc..f5c86c9 100644
--- a/js/dither.js
+++ b/js/dither.js
@@ -5,11 +5,6 @@ var dither = {
c: '░',
d: ' ',
p: function(n){
- if (0 <= 0 && n < 1) {
- return dither.aa[Math.floor(n * 4)]
- }
- else {
- return dither.aa[Math.floor(n % 4)]
- }
+ return dither.aa[Math.floor(Math.abs(n) % 4)]
}
}