






"""simple docstring"""






from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
A_			  =    9.80665




def 						_UpperCamelCase			(  A    ,       A			):

   # Ensure valid instance
   if not isinstance(A    ,       (int, float)			):
      raise TypeError("Invalid velocity. Should be a positive number."			)

   if not isinstance(A    ,       (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 						_UpperCamelCase			(  A    ,       A			):
   check_args(A    ,       A			)
   UpperCamelCase_     =angle_to_radians(2 * angle			)
   return round(init_velocity**2 * sin(A			) / g    ,       2			)




def 						_UpperCamelCase			(  A    ,       A			):
   check_args(A    ,       A			)
   UpperCamelCase_     =angle_to_radians(A			)
   return round(init_velocity**2 * sin(A			) ** 2 / (2 * g)    ,       2			)




def 						_UpperCamelCase			(  A    ,       A			):
   check_args(A    ,       A			)
   UpperCamelCase_     =angle_to_radians(A			)
   return round(2 * init_velocity * sin(A			) / g    ,       2			)




def 						_UpperCamelCase			(  ):
   UpperCamelCase_    ,							UpperCamelCase_     =25, 20
   assert horizontal_distance(A    ,       A			) == 40.97
   assert max_height(A    ,       A			) == 3.73
   assert total_time(A    ,       A			) == 1.74


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

    testmod()

    # Get input from user
    A_			  =    float(input("Initial Velocity: ").strip())

    # Get input from user
    A_			  =    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 __future__ import annotations

from pathlib import Path




def 						_UpperCamelCase			(  A    ,       A			):
   return pointa[0] * pointa[1] - pointa[1] * pointa[0]




def 						_UpperCamelCase			(  A    ,       A    ,       A    ,       A    ,       A    ,       A			):
   UpperCamelCase_     =(xa, ya)
   UpperCamelCase_     =(xa - xa, ya - ya)
   UpperCamelCase_     =(xa - xa, ya - ya)
   UpperCamelCase_     =-vector_product(A    ,       A			) / vector_product(
       A    ,       A			)
   UpperCamelCase_     =+vector_product(A    ,       A			) / vector_product(
       A    ,       A			)

   return a > 0 and b > 0 and a + b < 1




def 						_UpperCamelCase			(  A = "p102_triangles.txt"			):
   UpperCamelCase_     =Path(A			).parent.joinpath(A			).read_text(encoding="utf-8"			)

   UpperCamelCase_     =[]
   for line in data.strip().split("\n"			):
      triangles.append([int(A			) for number in line.split(","			)]			)

   UpperCamelCase_     =0
   UpperCamelCase_     =42

   for triangle in triangles:
      ret += contains_origin(*A			)

   return ret


if __name__ == "__main__":
    print(f'''{solution() = }''')
