MCPcopy Create free account
hub / github.com/ActiveState/code / ColStr

Function ColStr

recipes/Python/576521_Blobby_Planet/recipe-576521.py:26–34  ·  view source on GitHub ↗
( x)

Source from the content-addressed store, hash-verified

24 return crossRef[ faceKey]
25
26def ColStr( x):
27 if x > 255:
28 x = 0
29 if x < 0:
30 x = 255
31 s = "%x" % x # converts x into a hexidecimal string
32 if len( s) < 2:
33 s = '0' + s
34 return s
35
36def AddIfUnique( NewEdges, edge):
37 a = edge[ 0]

Callers 1

ConvertTo255Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected