mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-30 22:23:42 +00:00
imported radians from math
This commit is contained in:
parent
552546f2c1
commit
bc31e3fa71
|
@ -15,19 +15,12 @@ For more info: https://en.wikipedia.org/wiki/Projectile_motion
|
|||
"""
|
||||
|
||||
# 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)
|
||||
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:
|
||||
"""
|
||||
Returns the horizontal distance that the object cover
|
||||
|
|
Loading…
Reference in New Issue
Block a user