MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / randomize

Function randomize

tools/python-3.11.9-amd64/Lib/turtledemo/forest.py:21–24  ·  view source on GitHub ↗
( branchlist, angledist, sizedist )

Source from the content-addressed store, hash-verified

19 return randrange(-n,n+1)
20
21def randomize( branchlist, angledist, sizedist ):
22 return [ (angle+symRandom(angledist),
23 sizefactor*1.01**symRandom(sizedist))
24 for angle, sizefactor in branchlist ]
25
26def randomfd( t, distance, parts, angledist ):
27 for i in range(parts):

Callers 1

treeFunction · 0.70

Calls 1

symRandomFunction · 0.85

Tested by

no test coverage detected