Accurate Aiming

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

# Target coordinates

target_x = 10
target_y = 20

# Shooter coordinates
shooter_x = 0
shooter_y = 0

# Calculate angle to aim


angle_to_target = math.atan2(target_y - shooter_y, target_x - shooter_x)

# Convert angle from radians to degrees


angle_degrees = math.degrees(angle_to_target)

print("Angle to aim:", angle_degrees, "degrees")

You might also like