parameters: (self, number_of_headings: int)
return_statement: return sorted([np.arctan2(j, i) for i, j in zip(outer_edge_x, outer_edge_y)])
docstring: Calculate the heading discretization based on the number of headings.
  
          Does not uniformly generate headings but instead generates a set of
          discrete headings that is better suited for straight line trajectories.
  
          Args:
          number_of_headings: int
              The number of headings to discretize a 360 degree turn into
  
          Returns
          -------
          list
              A list of headings in radians
docstring_summary: Calculate the heading discretization based on the number of headings.
docstring_tokens: Calculate the heading discretization based on the number of headings .
function: def _get_heading_discretization(self, number_of_headings: int) -> list:
          """
          Calculate the heading discretization based on the number of headings.
  
          Does not uniformly generate headings but instead generates a set of
          discrete headings that is better suited for straight line trajectories.
  
          Args:
          number_of_headings: int
              The number of headings to discretize a 360 degree turn into
  
          Returns
          -------
          list
              A list of headings in radians
  
          """
          max_val = int((((number_of_headings + 4) / 4) - 1) / 2)
  
          outer_edge_x = []
          outer_edge_y = []
  
          # Generate points that lie on the perimeter of the surface
          # of a square with sides of length max_val
          for i in range(-max_val, max_val + 1):
              outer_edge_x.extend([i, i])
              outer_edge_y.extend([-max_val, max_val])
  
              if i != max_val and i != -max_val:
                  outer_edge_x.extend([-max_val, max_val])
                  outer_edge_y.extend([i, i])
  
          return sorted([np.arctan2(j, i) for i, j in zip(outer_edge_x, outer_edge_y)])
function_tokens: def _get_heading_discretization ( self , number_of_headings : int ) -> list : max_val = int ( ( ( ( number_of_headings + 4 ) / 4 ) - 1 ) / 2 ) outer_edge_x = [ ] outer_edge_y = [ ] # Generate points that lie on the perimeter of the surface # of a square with sides of length max_val for i in range ( - max_val , max_val + 1 ) : outer_edge_x . extend ( [ i , i ] ) outer_edge_y . extend ( [ - max_val , max_val ] ) if i != max_val and i != - max_val : outer_edge_x . extend ( [ - max_val , max_val ] ) outer_edge_y . extend ( [ i , i ] ) return sorted ( [ np . arctan2 ( j , i ) for i , j in zip ( outer_edge_x , outer_edge_y ) ] )