Skip to content

Commit 3ce751e

Browse files
authored
A real mathematical "mod 4", not a Javascript-ish one
1 parent 990f86d commit 3ce751e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cnn/cnn2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ function drawFractal() {
231231
}
232232
else if (mode === "mod4") {
233233
const s = Math.round(raw);
234+
const r = ((s % 4) + 4) % 4;
234235
color = (s % 4 === 0 || s % 4 === 1) ? "#000" : "#fff";
235236
}
236237
else if (mode === "livingstone") {

0 commit comments

Comments
 (0)