Skip to content

Commit

Permalink
Check once
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Dec 4, 2024
1 parent 61e94bb commit 2249257
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions coloraide/average.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ def average(
totals[i] += 1
if i == hue_index:
rad = math.radians(coord)
sin += (math.sin(rad) * alpha) if premultiplied else math.sin(rad)
cos += (math.cos(rad) * alpha) if premultiplied else math.cos(rad)
if premultiplied:
sin += (math.sin(rad) * alpha)
cos += (math.cos(rad) * alpha)
else:
sin += math.sin(rad)
cos += math.cos(rad)
else:
sums[i] += (coord * alpha) if premultiplied and i != alpha_index else coord
i += 1
Expand Down

0 comments on commit 2249257

Please sign in to comment.