We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0a4685 commit fa4c23bCopy full SHA for fa4c23b
wled00/FX.cpp
@@ -7737,9 +7737,9 @@ uint16_t mode_2Doctopus() {
7737
const int C_Y = (rows / 2) + ((SEGMENT.custom2 - 128)*rows)/255;
7738
for (int x = 0; x < cols; x++) {
7739
for (int y = 0; y < rows; y++) {
7740
- rMap[XY(x, y)].angle = int(40.7436f * atan2_t((y - C_Y), (x - C_X))); // avoid 128*atan2()/PI
7741
int dx = (x - C_X);
7742
int dy = (y - C_Y);
+ rMap[XY(x, y)].angle = int(40.7436f * atan2_t(dy, dx)); // avoid 128*atan2()/PI
7743
rMap[XY(x, y)].radius = sqrtf(dx * dx + dy * dy) * mapp; //thanks Sutaburosu
7744
}
7745
0 commit comments