mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
randint wants integer values for the range
This commit is contained in:
@@ -57,8 +57,8 @@ def makeRandomRectangles(num, W, H):
|
||||
rects = []
|
||||
|
||||
for i in range(num):
|
||||
w = random.randint(10, W/2)
|
||||
h = random.randint(10, H/2)
|
||||
w = random.randint(10, int(W/2))
|
||||
h = random.randint(10, int(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