(solved) Fading a RGB strip from one content to another one / Math problem

@pylon

Ok, it took me some beers to understand the trick: all my "if" conditions are obsolete, because the difference turns negative itself - resulting in automatically decreasing the value in case of a smaller targetvalue (new_frame < old_frame). Beautiful math! Thanks for that, that will speed it up.

leds[b].r = (int)leds[b].r + ((int)new_frame[b][0] - (int)old_frame[b][0]) * a /steps;

But the first part after the "=" needs to be the constant same old value:

leds[b].r =  (int)old_frame[b][0] + ((int)new_frame[b][0] - (int)old_frame[b][0]) * a /steps;

We want to fade linear, not progressive. So we increase or decrease always the same starting point - the old color, we started with.

Cheers.