




from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray

def       _SCREAMING_SNAKE_CASE      (							lowercase     :	float     ,							lowercase     :	float     ,							lowercase     :	bool = False					):


      '''simple docstring'''



      if radian_mode:
            return [magnitude * cos(lowerCAmelCase__					), magnitude * sin(lowerCAmelCase__					)]
      return [magnitude * cos(radians(lowerCAmelCase__					)					), magnitude * sin(radians(lowerCAmelCase__					)					)]

def       _SCREAMING_SNAKE_CASE      (							lowercase     :	NDArray[floataa]     ,							lowercase     :	NDArray[floataa]     ,							lowercase     :	float = 10**-1					):


      '''simple docstring'''



      lowerCamelCase_							=   cross(lowerCAmelCase__     ,							lowerCAmelCase__					)
      lowerCamelCase_							=   sum(lowerCAmelCase__					)
      return abs(lowerCAmelCase__					) < eps


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

    lowerCamelCase    :		str			   =       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    :		Any			   =       array([[0, 0], [0, 0], [0, 0]])

    assert in_static_equilibrium(forces, location)

    # Problem in image_data/2D_problems_1.jpg
    lowerCamelCase    :		Optional[Any]			   =       array([[0, -2_000], [0, -1_200], [0, 15_600], [0, -12_400]])

    lowerCamelCase    :		Tuple			   =       array([[0, 0], [6, 0], [10, 0], [12, 0]])

    assert in_static_equilibrium(forces, location)

    import doctest

    doctest.testmod()









import math

def       _SCREAMING_SNAKE_CASE      (							lowercase     :	int					):


      '''simple docstring'''



      lowerCamelCase_							=   0
      lowerCamelCase_							=   0
      while num > 0:
            lowerCamelCase_							=   num % 8
            lowerCamelCase_							=   octal + (remainder * math.floor(math.pow(10     ,							lowercase					)					))
            counter += 1
            lowerCamelCase_							=   math.floor(num / 8					)  # basically /= 8 without remainder if any
            # This formatting removes trailing '.0' from `octal`.
      return f"""0o{int(lowercase					)}"""

def       _SCREAMING_SNAKE_CASE      (							):


      '''simple docstring'''



      print('\n2 in octal is:'					)
      print(decimal_to_octal(2					)					)  # = 2
      print('\n8 in octal is:'					)
      print(decimal_to_octal(8					)					)  # = 10
      print('\n65 in octal is:'					)
      print(decimal_to_octal(65					)					)  # = 101
      print('\n216 in octal is:'					)
      print(decimal_to_octal(2_16					)					)  # = 330
      print('\n512 in octal is:'					)
      print(decimal_to_octal(5_12					)					)  # = 1000
      print('\n'					)


if __name__ == "__main__":
 main()



