def tileswrap(ihtORsize, numtilings, floats, wrapwidths, ints=[], readonly=False):
 qfloats = [floor((f * numtilings)) for f in floats]
 Tiles = []
 for tiling in range(numtilings):
  tilingX2 = (tiling * 2)
  coords = [tiling]
  b = tiling
  for (q, width) in zip_longest(qfloats, wrapwidths):
   c = ((q + (b % numtilings)) // numtilings)
   coords.append(((c % width) if width else c))
   b += tilingX2
  coords.extend(ints)
  Tiles.append(hashcoords(coords, ihtORsize, readonly))
 return Tiles

def tileswrap ( ihtORsize , numtilings , floats , wrapwidths , ints = [ ] , readonly = False ) : qfloats = [ floor ( ( f * numtilings ) ) for f in floats ] Tiles = [ ] for tiling in range ( numtilings ) : tilingX2 = ( tiling * 2 ) coords = [ tiling ] b = tiling for ( q , width ) in zip_longest ( qfloats , wrapwidths ) : c = ( ( q + ( b % numtilings ) ) // numtilings ) coords . append ( ( ( c % width ) if width else c ) ) b += tilingX2 coords . extend ( ints ) Tiles . append ( hashcoords ( coords , ihtORsize , readonly ) ) return Tiles
returns num-tilings tile indices corresponding to the floats and ints .