mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-11 06:29:15 +00:00
Change M_2_PI to 2 * PI as it should be
This commit is contained in:
parent
dcf9fa1aaa
commit
1e6a3f9e17
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ static uint8_t crossfade_start_frame[NUM_ROWS][NUM_COLS];
|
|||
static uint8_t crossfade_end_frame[NUM_ROWS][NUM_COLS];
|
||||
|
||||
static uint8_t compute_gradient_color(float t, float index, float num) {
|
||||
const float two_pi = M_2_PI;
|
||||
const float two_pi = M_PI * 2.0f;
|
||||
float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi;
|
||||
float x = t * two_pi + normalized_index;
|
||||
float v = 0.5 * (cosf(x) + 1.0f);
|
||||
|
|
Loading…
Reference in a new issue