From 07646ac92b6510e595c20211f374af8fc7e97df2 Mon Sep 17 00:00:00 2001 From: Aviv Faraj <73610201+avivfaraj@users.noreply.github.com> Date: Tue, 7 Sep 2021 14:41:47 -0400 Subject: [PATCH] Update horizontal_projectile_motion.py --- physics/horizontal_projectile_motion.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/physics/horizontal_projectile_motion.py b/physics/horizontal_projectile_motion.py index 0ae6348ea..1fb02f42c 100644 --- a/physics/horizontal_projectile_motion.py +++ b/physics/horizontal_projectile_motion.py @@ -21,7 +21,6 @@ from math import sin # Acceleration Constant on hearth (unit m/s^2) g = 9.80665 - def horizontal_distance(init_velocity: float, angle: float) -> float: """ Returns the horizontal distance that the object cover @@ -40,7 +39,7 @@ def horizontal_distance(init_velocity: float, angle: float) -> float: 414.76 """ radians = angle_to_radians(2 * angle) - return round((init_velocity ** 2) * sin(radians) / g, 2) + return round(init_velocity ** 2 * sin(radians) / g, 2) def max_height(init_velocity: float, angle: float) -> float: @@ -62,7 +61,7 @@ def max_height(init_velocity: float, angle: float) -> float: """ radians = angle_to_radians(angle) - return round(((init_velocity ** 2) * (sin(radians)) ** 2) / (2 * g), 2) + return round((init_velocity ** 2 * sin(radians) ** 2) / (2 * g), 2) def total_time(init_velocity: float, angle: float) -> float: @@ -84,7 +83,7 @@ def total_time(init_velocity: float, angle: float) -> float: """ radians = angle_to_radians(angle) - return round((2 * init_velocity) * (sin(radians)) / g, 2) + return round(2 * init_velocity * sin(radians) / g, 2) def test_motion() -> None: