minor: rename local vars without _circle suffix

This commit is contained in:
Cosimo Lupo 2021-01-15 18:17:08 +00:00
parent b465dcff75
commit c9055871d6
No known key found for this signature in database
GPG Key ID: 179A8F0895A02F4F

View File

@ -90,12 +90,12 @@ def round_start_circle_stable_containment(c0, r0, c1, r1):
https://github.com/googlefonts/colr-gradients-spec/issues/204 https://github.com/googlefonts/colr-gradients-spec/issues/204
https://github.com/googlefonts/picosvg/issues/158 https://github.com/googlefonts/picosvg/issues/158
""" """
start_circle, end_circle = Circle(c0, r0), Circle(c1, r1) start, end = Circle(c0, r0), Circle(c1, r1)
inside_before_round = start_circle.inside(end_circle) inside_before_round = start.inside(end)
round_start = start_circle.round() round_start = start.round()
round_end = end_circle.round() round_end = end.round()
# At most 3 iterations ought to be enough to converge. In the first, we # At most 3 iterations ought to be enough to converge. In the first, we
# check if the start circle keeps containment after normal rounding; then # check if the start circle keeps containment after normal rounding; then
@ -131,9 +131,9 @@ def round_start_circle_stable_containment(c0, r0, c1, r1):
round_start.nudge_towards(direction) round_start.nudge_towards(direction)
else: # likely a bug else: # likely a bug
raise AssertionError( raise AssertionError(
f"Rounding circle {start_circle} " f"Rounding circle {start} "
f"{'inside' if inside_before_round else 'outside'} " f"{'inside' if inside_before_round else 'outside'} "
f"{end_circle} failed after {max_attempts} attempts!" f"{end} failed after {max_attempts} attempts!"
) )
return round_start return round_start