Skip to content

Commit

Permalink
integer division for randint
Browse files Browse the repository at this point in the history
Python 3.12 does not accept floats for random.randint() anymore
  • Loading branch information
bnavigator authored Jan 6, 2024
1 parent 1f9b5f4 commit 3b042c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unittests/test_dcDrawLists.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def makeRandomRectangles():
rects = []

for i in range(num):
W = random.randint(10, w/2)
H = random.randint(10, h/2)
W = random.randint(10, w//2)
H = random.randint(10, h//2)
x = random.randint(0, w - W)
y = random.randint(0, h - H)
rects.append( (x, y, W, H) )
Expand Down

0 comments on commit 3b042c8

Please sign in to comment.