Skip to content

Commit

Permalink
EffectRadar::radarRoutine use adopted EffectMath::mapsincos8
Browse files Browse the repository at this point in the history
  • Loading branch information
vortigont committed Dec 22, 2023
1 parent 0a2c79c commit b7c0c75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2052,8 +2052,8 @@ bool EffectRadar::radarRoutine()
fb->fade(5 + 20 * (float)speed / 255);
for (float offset = 0.0f; offset < (float)fb->maxDim() /2; offset +=0.25)
{
float x = EffectMath::mapsincos16(false, eff_theta, offset * 4, fb->maxDim() * 4 - offset * 4) / 4. - width_adj_f;
float y = EffectMath::mapsincos16(true, eff_theta, offset * 4, fb->maxDim() * 4 - offset * 4) / 4. - height_adj_f;
float x = EffectMath::mapsincos8(false, eff_theta, offset * 4, fb->maxDim() * 4 - offset * 4) / 4. - width_adj_f;
float y = EffectMath::mapsincos8(true, eff_theta, offset * 4, fb->maxDim() * 4 - offset * 4) / 4. - height_adj_f;
CRGB color = ColorFromPalette(*curPalette, hue, 255 / random8(1, 12));
EffectMath::drawPixelXYF(x, y, color, fb);
}
Expand Down

0 comments on commit b7c0c75

Please sign in to comment.