summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/moire/moire.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/moire/moire.c b/src/modules/moire/moire.c
index 973fbee..a06549c 100644
--- a/src/modules/moire/moire.c
+++ b/src/modules/moire/moire.c
@@ -101,8 +101,7 @@ static void moire_render_fragment(til_module_context_t *context, til_stream_t *s
dx = cx - centers[i].x;
dy = cy - centers[i].y;
- if ((int)((sqrtf(dx * dx + dy * dy)) * 20.f) % 2)
- filled ^= 1;
+ filled ^= ((int)((sqrtf(dx * dx + dy * dy)) * 20.f) & 0x1);
}
if (filled)
© All Rights Reserved