Skip to content

Commit 53bc03a

Browse files
authored
Fix color assignment logic in mod4 mode
1 parent 3ce751e commit 53bc03a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cnn/cnn2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function drawFractal() {
232232
else if (mode === "mod4") {
233233
const s = Math.round(raw);
234234
const r = ((s % 4) + 4) % 4;
235-
color = (s % 4 === 0 || s % 4 === 1) ? "#000" : "#fff";
235+
color = (r === 0 || r === 1) ? "#000" : "#fff";
236236
}
237237
else if (mode === "livingstone") {
238238
const s = Math.round(raw);

0 commit comments

Comments
 (0)