Skip to content

Commit a47f7c5

Browse files
committed
Bind all local variables
1 parent e9befe0 commit a47f7c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

coloraide/spectrum.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ def closest_wavelength(
122122
continue
123123

124124
# Compare the interpolated angle with the actual angle
125-
angle_diff = lambda f, a=i0, b=i, t=target: xy_to_angle(
126-
cmfs.CIE_1931_2DEG.xy(alg.lerp(LOCUS_START + a, LOCUS_START + b, f)),
127-
white,
128-
start
125+
angle_diff = lambda f, a=LOCUS_START + i0, b=LOCUS_START + i, t=target, w=white, s=start: xy_to_angle(
126+
cmfs.CIE_1931_2DEG.xy(alg.lerp(a, b, f)),
127+
w,
128+
s
129129
) - t
130130

131131
# Linear interpolation of a non-linear curve will yield some offset from our current angle.

0 commit comments

Comments
 (0)