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