Skip to content

Commit

Permalink
Small tweak to interpolation logic
Browse files Browse the repository at this point in the history
Treat each interpolation piece the same way when calculating "actual
steps"
  • Loading branch information
facelessuser committed Nov 28, 2021
1 parent 92e8dc1 commit 0599562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coloraide/interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def color_steps(
if not isinstance(deltas, Sequence):
deltas = [deltas]
# Make a very rough guess of required steps.
actual_steps = max(steps, math.ceil(sum([d / max_delta_e for d in deltas])) + 1)
actual_steps = max(steps, sum([math.ceil(d / max_delta_e) + 1 for d in deltas]))

if max_steps is not None:
actual_steps = min(actual_steps, max_steps)
Expand Down

0 comments on commit 0599562

Please sign in to comment.