From f97edbfa34358f486d63b4a6e12a5f9e8969ee22 Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Sun, 19 Aug 2012 13:14:27 +0000 Subject: [PATCH] fixed small typo (doesn't make a big difference, though) + faster transitions --- animations/squares.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/animations/squares.c b/animations/squares.c index c915bc7..56e3a42 100644 --- a/animations/squares.c +++ b/animations/squares.c @@ -20,7 +20,7 @@ #include "squares.h" #define STEP_WIDTH (NUMPLANE * 2u) -#define TICK 150 +#define TICK 100 #define CYCLES 200u /** @@ -54,7 +54,7 @@ void squares(void) { // add randomly calculated offsets to each layer starting points for (uint8_t i = 0; i < NUMPLANE; ++i) { - nOffsets[i] = (nOffsets[i] + random8()) & STEP_WIDTH; + nOffsets[i] = (nOffsets[i] + random8()) % STEP_WIDTH; } // rotate color map nColOffset = (nColOffset + 1) % (NUMPLANE * 2);