Skip to content

Commit fa4c23b

Browse files
committed
minor improvement
1 parent a0a4685 commit fa4c23b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wled00/FX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7737,9 +7737,9 @@ uint16_t mode_2Doctopus() {
77377737
const int C_Y = (rows / 2) + ((SEGMENT.custom2 - 128)*rows)/255;
77387738
for (int x = 0; x < cols; x++) {
77397739
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
77417740
int dx = (x - C_X);
77427741
int dy = (y - C_Y);
7742+
rMap[XY(x, y)].angle = int(40.7436f * atan2_t(dy, dx)); // avoid 128*atan2()/PI
77437743
rMap[XY(x, y)].radius = sqrtf(dx * dx + dy * dy) * mapp; //thanks Sutaburosu
77447744
}
77457745
}

0 commit comments

Comments
 (0)