(lights, size)
Place four lights at the corner of the pitch.
Place four lights at the corner of the pitch.
Place four lights at the corner of the pitch .
def _reposition_corner_lights(lights, size):
  """Place four lights at the corner of the pitch."""
  mean_size = 0.5 * sum(size)
  height = mean_size * 2/3
  counter = 0
  for x in [-size[0], size[0]]:
    for y in [-size[1], size[1]]:
      position = np.array((x, y, height))
      direction = -np.array((x, y, height*2))
      lights[counter].pos = position
      lights[counter].dir = direction
      counter += 1
def _reposition_corner_lights ( lights , size ) : mean_size = 0.5 * sum ( size ) height = mean_size * 2 / 3 counter = 0 for x in [ - size [ 0 ] , size [ 0 ] ] : for y in [ - size [ 1 ] , size [ 1 ] ] : position = np . array ( ( x , y , height ) ) direction = - np . array ( ( x , y , height * 2 ) ) lights [ counter ] . pos = position lights [ counter ] . dir = direction counter += 1