Deciding if a target will be hit is determined at compile time. We find for each target a range of angles for which the target will be in the path of the projectile. The particular range varies according to the location of the target with respect to the y-axis. If the target is to the left of the y-axis, we use the upper-right and lower-left corners of the target for computing respectively the minimum and maximum angles. If the target is right of the y-axis, we then use the upper-left and lower-right corners. The lower-left and the lower-right corners are used when y-axis goes through the target.

The minimum and maximum angles are computed with respect to the y-axis. First, we form the vector from the weapon's center to the appropriate corner of the target and normalize the vector. We then use the fact that the dot product of two normalized vectors is the cosine of the angle between the vectors. Thus, using the vector (0, 1, 0) for the vector along the y-axis, the dot product of this with the min and max angle vectors is the y-coordinate of each vector. In turn, the arccosine of this coordinate is the desired angle except for adjusting for the sign of the angle.