Merge pull request #6016 from todbot/rainbowio-255p5-fix
fix #6015: rainbowio error for input > 255.0 < 256.0
This commit is contained in:
commit
34092437ec
@ -42,5 +42,6 @@ int32_t colorwheel(mp_float_t pos) {
|
||||
shift2 = 0;
|
||||
}
|
||||
int p = (int)(pos * 3);
|
||||
p = (p < 256) ? p : 255;
|
||||
return (p << shift1) | ((255 - p) << shift2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user