

'''simple docstring'''

from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
a       :      Union[str, Any]  	=			9.8_0_6_6_5





def 				lowercase (					__magic_name__			,   __magic_name__							):



					'''simple docstring'''







					if not isinstance(SCREAMING_SNAKE_CASE__			,   (int, float)							):
										raise TypeError("Invalid velocity. Should be a positive number."							)

					if not isinstance(SCREAMING_SNAKE_CASE__			,   (int, float)							):
										raise TypeError("Invalid angle. Range is 1-90 degrees."							)

					# Ensure valid angle
					if angle > 90 or angle < 1:
										raise ValueError("Invalid angle. Range is 1-90 degrees."							)

					# Ensure valid velocity
					if init_velocity < 0:
										raise ValueError("Invalid velocity. Should be a positive number."							)





def 				lowercase (					__magic_name__			,   __magic_name__							):



					'''simple docstring'''







					check_args(SCREAMING_SNAKE_CASE__			,   SCREAMING_SNAKE_CASE__							)
					UpperCAmelCase		:							int        =       angle_to_radians(2 * angle							)
					return round(init_velocity**2 * sin(SCREAMING_SNAKE_CASE__							) / g			,   2							)





def 				lowercase (					__magic_name__			,   __magic_name__							):



					'''simple docstring'''







					check_args(SCREAMING_SNAKE_CASE__			,   SCREAMING_SNAKE_CASE__							)
					UpperCAmelCase		:							List[str]        =       angle_to_radians(SCREAMING_SNAKE_CASE__							)
					return round(init_velocity**2 * sin(SCREAMING_SNAKE_CASE__							) ** 2 / (2 * g)			,   2							)





def 				lowercase (					__magic_name__			,   __magic_name__							):



					'''simple docstring'''







					check_args(SCREAMING_SNAKE_CASE__			,   SCREAMING_SNAKE_CASE__							)
					UpperCAmelCase		:							str        =       angle_to_radians(SCREAMING_SNAKE_CASE__							)
					return round(2 * init_velocity * sin(SCREAMING_SNAKE_CASE__							) / g			,   2							)





def 				lowercase (					):



					'''simple docstring'''







					UpperCAmelCase		:							Optional[int]        =       25, 20
					assert horizontal_distance(SCREAMING_SNAKE_CASE__			,   SCREAMING_SNAKE_CASE__							) == 4_0.9_7
					assert max_height(SCREAMING_SNAKE_CASE__			,   SCREAMING_SNAKE_CASE__							) == 3.7_3
					assert total_time(SCREAMING_SNAKE_CASE__			,   SCREAMING_SNAKE_CASE__							) == 1.7_4


if __name__ == "__main__":
						from doctest import testmod

						testmod()

						# Get input from user
						a       :      List[str]  	=			float(input("Initial Velocity: ").strip())

						# Get input from user
						a       :      Any  	=			float(input("angle: ").strip())

						# Print results
						print()
						print("Results: ")
						print(F'Horizontal Distance: {horizontal_distance(init_vel, angle)!s} [m]')
						print(F'Maximum Height: {max_height(init_vel, angle)!s} [m]')
						print(F'Total Time: {total_time(init_vel, angle)!s} [s]')



'''simple docstring'''

from ..utils import DummyObject, requires_backends







class   UpperCamelCase__   (       metaclass=lowercase__       ):


		"""simple docstring"""

		SCREAMING_SNAKE_CASE__  :     List[Any]       =							["torch", "transformers", "invisible_watermark"]







		def __init__(			self   ,      *snake_case   ,      **snake_case      ):


							'''simple docstring'''

							requires_backends(self   ,      ["torch", "transformers", "invisible_watermark"]      )







		@classmethod
		def 				A_	(			cls   ,      *snake_case   ,      **snake_case      ):


							'''simple docstring'''

							requires_backends(cls   ,      ["torch", "transformers", "invisible_watermark"]      )







		@classmethod
		def 				A_	(			cls   ,      *snake_case   ,      **snake_case      ):


							'''simple docstring'''

							requires_backends(cls   ,      ["torch", "transformers", "invisible_watermark"]      )







class   UpperCamelCase__   (       metaclass=lowercase__       ):


		"""simple docstring"""

		SCREAMING_SNAKE_CASE__  :     int       =							["torch", "transformers", "invisible_watermark"]







		def __init__(			self   ,      *snake_case   ,      **snake_case      ):


							'''simple docstring'''

							requires_backends(self   ,      ["torch", "transformers", "invisible_watermark"]      )







		@classmethod
		def 				A_	(			cls   ,      *snake_case   ,      **snake_case      ):


							'''simple docstring'''

							requires_backends(cls   ,      ["torch", "transformers", "invisible_watermark"]      )







		@classmethod
		def 				A_	(			cls   ,      *snake_case   ,      **snake_case      ):


							'''simple docstring'''

							requires_backends(cls   ,      ["torch", "transformers", "invisible_watermark"]      )
