mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
integer division for randint
Python 3.12 does not accept floats for random.randint() anymore
This commit is contained in:
@@ -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) )
|
||||
|
||||
Reference in New Issue
Block a user