imported radians from math

This commit is contained in:
avivfaraj 2021-09-05 12:56:31 -04:00 committed by GitHub
parent 552546f2c1
commit bc31e3fa71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,19 +15,12 @@ For more info: https://en.wikipedia.org/wiki/Projectile_motion
""" """
# Importing packages # Importing packages
from math import pi, sin from math import pi, sin, radians as angle_to_radians
# Acceleration Constant on hearth (unit m/s^2) # Acceleration Constant on hearth (unit m/s^2)
g = 9.80665 g = 9.80665
def angle_to_radians(angle : float) -> float:
"""
Convert an angle from degrees to randians
"""
return angle * pi / 180
def horizontal_distance(init_velocity: float, angle: float) -> float: def horizontal_distance(init_velocity: float, angle: float) -> float:
""" """
Returns the horizontal distance that the object cover Returns the horizontal distance that the object cover