(arglist, norm, add=None, flip=False)
return new_arglist
Normalize the given args with the given norm value.
Normalize the given args with the given norm value.
Normalize the given args with the given norm value .
def _normalize_args(arglist, norm, add=None, flip=False):
  """Normalize the given args with the given norm value."""
  new_arglist = []
  for i, arg in enumerate(arglist):
    new_arg = float(arg)

    if add is not None:
      add_to_x, add_to_y = add

      # This argument is an x-coordinate if even, y-coordinate if odd
      # except when flip == True
      if i % 2 == 0:
        new_arg += add_to_y if flip else add_to_x
      else:
        new_arg += add_to_x if flip else add_to_y

    new_arglist.append(str(24 * new_arg / norm))
  return new_arglist
def _normalize_args ( arglist , norm , add = None , flip = False ) : new_arglist = [ ] for i , arg in enumerate ( arglist ) : new_arg = float ( arg ) if add is not None : add_to_x , add_to_y = add # This argument is an x-coordinate if even, y-coordinate if odd # except when flip == True if i % 2 == 0 : new_arg += add_to_y if flip else add_to_x else : new_arg += add_to_x if flip else add_to_y new_arglist . append ( str ( 24 * new_arg / norm ) ) return new_arglist