You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LeaVerou
changed the title
hue: "longer" interpolates in reverse order
hue: "longer" interpolates in reverse order when colors have hues that differ by 360
Jun 26, 2022
LeaVerou
changed the title
hue: "longer" interpolates in reverse order when colors have hues that differ by 360
hue: "longer" interpolates in reverse order when colors have hues that differ by multiples of 360
Jun 26, 2022
I think it helps, for this -20 380 case, to consider the least surprise if we are actually animating from, say, -18 to -22. We want a consistent interpolation direction, not a discontinuity or reversal as we pass through "angular difference mod 360 is zero".
I also think (by analogy with the "zero length vector has no direction" problem in geometry) that the algorithm should extract a direction before all the angle fix-up happens
Testcase:
Outputs:
It should instead output:
The text was updated successfully, but these errors were encountered: