Check if intersecting within a 1 "block" radius
<p>I have two positions on a 3D system, say [15, 32, 42] and [16, 32, 42]</p>

<p>Is there a easy way to check if they are within a 1 block radius from each other?</p>

<p>This is what I have, but is there a better way of doing it:</p>

<pre><code>if (pos[0] == pos1[0] / 32 || pos[0] == pos1[0] + 1 || pos[0] == pos1[0] - 1)
{
    if (pos[1] == pos1[1] || pos[1] == pos1[1] - 1 || pos[1] == pos1[1] + 1)
    {
        if (pos[2] == pos1[2] || pos[2] == pos1[2] + 1 || pos[2] == pos1[2] - 1)
        {
</code></pre>

<p>Thanks,
David</p>
