



'''simple docstring'''



from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray
def 					UpperCAmelCase   (						A  :				int					,		A  :				Optional[int]					,		A  :				List[str] = False				):

							'''simple docstring'''





							if radian_mode:
														return [magnitude * cos(__A				), magnitude * sin(__A				)]
							return [magnitude * cos(radians(__A				)				), magnitude * sin(radians(__A				)				)]
def 					UpperCAmelCase   (						A  :				Optional[Any]					,		A  :				Dict					,		A  :				Optional[Any] = 10**-1				):

							'''simple docstring'''





							SCREAMING_SNAKE_CASE					:      NDArray[floataa]     					=			cross(__A					,		__A				)
							SCREAMING_SNAKE_CASE					:      float     					=			sum(__A				)
							return abs(__A				) < eps


if __name__ == "__main__":
							# Test to check if it works
							lowerCAmelCase_     :       List[str]								=						array(
							    [
							        polar_force(718.4, 180 - 30),
							        polar_force(879.54, 45),
							        polar_force(100, -90),
							    ]
							)

							lowerCAmelCase_     :       NDArray[floataa]								=						array([[0, 0], [0, 0], [0, 0]])

							assert in_static_equilibrium(forces, location)

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

							lowerCAmelCase_     :       int								=						array([[0, 0], [0, 0], [0, 0]])

							assert in_static_equilibrium(forces, location)

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

							lowerCAmelCase_     :       Any								=						array([[0, 0], [6, 0], [10, 0], [12, 0]])

							assert in_static_equilibrium(forces, location)

							import doctest

							doctest.testmod()









'''simple docstring'''



import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
lowerCAmelCase_     :       Optional[Any]								=						'.'


if __name__ == "__main__":
							lowerCAmelCase_     :       Optional[Any]								=						os.path.join(REPO_PATH, 'utils/documentation_tests.txt')
							lowerCAmelCase_     :       Dict								=						[]
							lowerCAmelCase_     :       Any								=						[]
							with open(doctest_file_path) as fp:
														for line in fp:
																					lowerCAmelCase_     :       List[str]								=						line.strip()
																					lowerCAmelCase_     :       Optional[Any]								=						os.path.join(REPO_PATH, line)
																					if not (os.path.isfile(path) or os.path.isdir(path)):
																												non_existent_paths.append(line)
																					all_paths.append(path)
							if len(non_existent_paths) > 0:
														lowerCAmelCase_     :       Dict								=						'\n'.join(non_existent_paths)
														raise ValueError(f'`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}')
							if all_paths != sorted(all_paths):
														raise ValueError('Files in `utils/documentation_tests.txt` are not in alphabetical order.')




