function projectile_distance ($inital_velocity, $angle, $initial_height, $g
{
$angle = deg2rad$angle);
$distance = ($inital_velocitycos$angle)/$g
* ($inital_velocitysin$angle)
+ sqrtpow$inital_velocitysin$angle),2)+2*$g$initial_height));
return $distance
}