Skip to content

Commit 07646ac

Browse files
authored
Update horizontal_projectile_motion.py
1 parent ee49ce7 commit 07646ac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: physics/horizontal_projectile_motion.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
# Acceleration Constant on hearth (unit m/s^2)
2222
g = 9.80665
2323

24-
2524
def horizontal_distance(init_velocity: float, angle: float) -> float:
2625
"""
2726
Returns the horizontal distance that the object cover
@@ -40,7 +39,7 @@ def horizontal_distance(init_velocity: float, angle: float) -> float:
4039
414.76
4140
"""
4241
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)
4443

4544

4645
def max_height(init_velocity: float, angle: float) -> float:
@@ -62,7 +61,7 @@ def max_height(init_velocity: float, angle: float) -> float:
6261
"""
6362

6463
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)
6665

6766

6867
def total_time(init_velocity: float, angle: float) -> float:
@@ -84,7 +83,7 @@ def total_time(init_velocity: float, angle: float) -> float:
8483
"""
8584

8685
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)
8887

8988

9089
def test_motion() -> None:

0 commit comments

Comments
 (0)