21
21
# Acceleration Constant on hearth (unit m/s^2)
22
22
g = 9.80665
23
23
24
-
25
24
def horizontal_distance (init_velocity : float , angle : float ) -> float :
26
25
"""
27
26
Returns the horizontal distance that the object cover
@@ -40,7 +39,7 @@ def horizontal_distance(init_velocity: float, angle: float) -> float:
40
39
414.76
41
40
"""
42
41
radians = angle_to_radians (2 * angle )
43
- return round (( init_velocity ** 2 ) * sin (radians ) / g , 2 )
42
+ return round (init_velocity ** 2 * sin (radians ) / g , 2 )
44
43
45
44
46
45
def max_height (init_velocity : float , angle : float ) -> float :
@@ -62,7 +61,7 @@ def max_height(init_velocity: float, angle: float) -> float:
62
61
"""
63
62
64
63
radians = angle_to_radians (angle )
65
- return round ((( init_velocity ** 2 ) * ( sin (radians ) ) ** 2 ) / (2 * g ), 2 )
64
+ return round ((init_velocity ** 2 * sin (radians ) ** 2 ) / (2 * g ), 2 )
66
65
67
66
68
67
def total_time (init_velocity : float , angle : float ) -> float :
@@ -84,7 +83,7 @@ def total_time(init_velocity: float, angle: float) -> float:
84
83
"""
85
84
86
85
radians = angle_to_radians (angle )
87
- return round (( 2 * init_velocity ) * ( sin (radians ) ) / g , 2 )
86
+ return round (2 * init_velocity * sin (radians ) / g , 2 )
88
87
89
88
90
89
def test_motion () -> None :
0 commit comments