Skip to content

Commit

Permalink
Revert functionality change to M12_pArc
Browse files Browse the repository at this point in the history
Left the new code in for reference
  • Loading branch information
troyhacks authored Aug 17, 2024
1 parent 20fde24 commit f23df9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,10 @@ void IRAM_ATTR_YN __attribute__((hot)) Segment::setPixelColor(int i, uint32_t co
float rad = 0.0f;
for (unsigned count = 0; count < numSteps; count++) {
// may want to try float version as well (with or without antialiasing)
int x = max(0, min(vW-1, (int)roundf(sinf(rad) * radius)));
int y = max(0, min(vH-1, (int)roundf(cosf(rad) * radius)));
// int x = max(0, min(vW-1, (int)roundf(sinf(rad) * radius)));
// int y = max(0, min(vH-1, (int)roundf(cosf(rad) * radius)));
int x = roundf(sinf(rad) * radius);
int y = roundf(cosf(rad) * radius);
setPixelColorXY(x, y, col);
if(useSymmetry) setPixelColorXY(y, x, col);// WLEDMM
rad += step;
Expand Down

0 comments on commit f23df9d

Please sign in to comment.