mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30: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 = []
|
rects = []
|
||||||
|
|
||||||
for i in range(num):
|
for i in range(num):
|
||||||
W = random.randint(10, w/2)
|
W = random.randint(10, w//2)
|
||||||
H = random.randint(10, h/2)
|
H = random.randint(10, h//2)
|
||||||
x = random.randint(0, w - W)
|
x = random.randint(0, w - W)
|
||||||
y = random.randint(0, h - H)
|
y = random.randint(0, h - H)
|
||||||
rects.append( (x, y, W, H) )
|
rects.append( (x, y, W, H) )
|
||||||
|
|||||||
Reference in New Issue
Block a user