


from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray
def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_ = False   )						->int:

   if radian_mode:
      return [magnitude * cos(lowerCamelCase_   ), magnitude * sin(lowerCamelCase_   )]
   return [magnitude * cos(radians(lowerCamelCase_   )   ), magnitude * sin(radians(lowerCamelCase_   )   )]
def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_ = 1_0**-1   )						->Tuple:
   UpperCAmelCase							=     cross(lowerCamelCase_  ,						lowerCamelCase_   )
   UpperCAmelCase							=     sum(lowerCamelCase_   )
   return abs(lowerCamelCase_   ) < eps


if __name__ == "__main__":
      # Test to check if it works
      __a     =			array(
          [
              polar_force(7_18.4, 180 - 30),
              polar_force(8_79.54, 45),
              polar_force(100, -90),
          ]
      )

      __a     =			array([[0, 0], [0, 0], [0, 0]])

      assert in_static_equilibrium(forces, location)

      # Problem 1 in image_data/2D_problems.jpg
      __a     =			array(
          [
              polar_force(30 * 9.81, 15),
              polar_force(215, 180 - 45),
              polar_force(264, 90 - 30),
          ]
      )

      __a     =			array([[0, 0], [0, 0], [0, 0]])

      assert in_static_equilibrium(forces, location)

      # Problem in image_data/2D_problems_1.jpg
      __a     =			array([[0, -2000], [0, -1200], [0, 1_5600], [0, -1_2400]])

      __a     =			array([[0, 0], [6, 0], [10, 0], [12, 0]])

      assert in_static_equilibrium(forces, location)

      import doctest

      doctest.testmod()







from __future__ import annotations
def   _UpperCamelCase				(						lowerCAmelCase_   )						->None:
   create_state_space_tree(lowerCAmelCase_  ,						[]  ,						0  ,						[0 for i in range(len(lowerCAmelCase_   )   )]   )
def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						)						->None:

   if index == len(lowerCAmelCase_   ):
      print(lowerCAmelCase_   )
      return

   for i in range(len(lowerCAmelCase_   )   ):
      if not index_used[i]:
         current_sequence.append(sequence[i]   )
         UpperCAmelCase							=     True
         create_state_space_tree(lowerCAmelCase_  ,						lowerCAmelCase_  ,						index + 1  ,						lowerCAmelCase_   )
         current_sequence.pop()
         UpperCAmelCase							=     False
__a     =			[3, 1, 2, 4]
generate_all_permutations(sequence)

__a     =			["A", "B", "C"]







generate_all_permutations(sequence_a)



