Skip to content

Latest commit

 

History

History

fun-with-physics-number-1-are-the-tanks-in-range-of-the-cannonballs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Whenever Ray sees some enemy tanks on the horizon, he always prepares his cannonball launcher to fend off the attacks. Usually he has some help from his trusty targeting system to determine if his cannonballs can reach the tanks (he doesn't like to waste cannonballs), but today his dog got a hold of it and broke it. Worse, Ray's cannonball supply is running low!

Quick! Help code a mechanism for Ray to determine if he's in range of the cannonballs based on the maximum shooting velocity and launch angle, as well as the distance away from the tanks!

OTHER INFO:
  • Ray has placed his cannon in such a way that enemy tanks are on equal height above sea level from the tanks.
  • You can ignore factors like air resistance and wind as you solve the Kata.
  • All measurements are in metric units
  • All inputs are valid
  • You may need to crack open some books to finish this Kata...