title: If objects (x,y) are near other objects (x,y)
body: <p>I have two separate objects in Java, <code>Object1</code> and <code>Object2</code>, both are the same size and square. For each object I can get the <em>x</em> and <em>y</em> coordinates. What I need to do is check if <code>Object1</code> is within a certain distance of <code>Object2</code>. That distance is within 32 points on both the <em>X</em> and <em>Y</em> axis.</p>
  
  <p>once the condition has been met then I can run my code. e.g.</p>
  
  <pre><code>    if ( check condition ) {
      //my code here
      }
  </code></pre>