PHP determining distances
<p>I have a huge array of 30x100 representing a football field. I make players move in it. However, when the ball is throwed, I need to determine if other players are within a +/-1 reach of the trajectory to possibly intercept the pass.</p>

<p>Since some (and most) passes are thrown diagonally, I have a hard time figuring out how to determine an algorythm to evaluate such thing.</p>

<p>My field looks like</p>

<pre><code>1 2 3 4 5 6 7 ...
2
3
4
5
6
7
...
</code></pre>

<p>Characters can only move from integrers (so each has a set of coordinates at every moment, such as (3,2) or (20,90).</p>

<p>What would be the simplest way of finding out if a player is within a certain range of my pass trajectory (say the pass goes from (2,4) to (30,15))?</p>
