8000 Use math.tau directly · hugovk/drop-python@a41208f · GitHub
[go: up one dir, main page]

Skip to content

Commit a41208f

Browse files
committed
Use math.tau directly
1 parent 629b731 commit a41208f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

svg_wheel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
OUTER_RADIUS = 180
2525
INNER_RADIUS = OUTER_RADIUS / 2
2626
CENTER = PADDING + OUTER_RADIUS
27-
TAU = 2 * math.pi # The angle, in radians, of a full circle.
2827

2928

3029
def annular_sector_path(start, stop):
@@ -58,10 +57,10 @@ def add_annular_sector(wheel, start, stop, style_class):
5857

5958

6059
def angles(index, total):
61-
start = index * TAU / total
62-
stop = (index + 1) * TAU / total
60+
start = index * math.tau / total
61+
stop = (index + 1) * math.tau / total
6362

64-
return start - TAU / 4, stop - TAU / 4
63+
return start - math.tau / 4, stop - math.tau / 4
6564

6665

6766
def add_fraction(wheel, packages, total, version):

0 commit comments

Comments
 (0)
0