Whitespace stuff. Tabs rule!
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-06-07 06:24:16 +02:00
parent b71faa3bcb
commit c5856a6f7a
41 changed files with 877 additions and 876 deletions

View File

@ -2,10 +2,10 @@
#include "functions.h"
void TwirlEffect::loop() {
for (int x=0; x<window.w; x++) for (int y=0; y<window.h; y++) {
uint8_t angle = (x==center_x && y==center_y) ? 0 : atan2(y - center_y, x - center_x) / M_PI * 128 + 128 + angleOffset;
uint8_t brightness = sqrt16((center_x - x) * (center_x - x) + (center_y - y) * (center_y - y)) & 0xFF;
setPixel(window, x, y, CHSV(angle, (brightness<<5) & 0xFF, 255));
}
angleOffset += 1;
for (int x=0; x<window.w; x++) for (int y=0; y<window.h; y++) {
uint8_t angle = (x==center_x && y==center_y) ? 0 : atan2(y - center_y, x - center_x) / M_PI * 128 + 128 + angleOffset;
uint8_t brightness = sqrt16((center_x - x) * (center_x - x) + (center_y - y) * (center_y - y)) & 0xFF;
setPixel(window, x, y, CHSV(angle, (brightness<<5) & 0xFF, 255));
}
angleOffset += 1;
}