fixed small typo (doesn't make a big difference, though) + faster transitions

This commit is contained in:
Christian Kroll 2012-08-19 13:14:27 +00:00
parent 663443055c
commit f97edbfa34
1 changed files with 2 additions and 2 deletions

View File

@ -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);