title: Euclidean distance returning strange results
body: <p>im writing a program to compare two images against each other based on color and im using the Euclidean distance algorithm however when i run it and pass in two images i get one distance and then when i pass in the same images but the other way round i get a completely different set of results. </p>
  
  <p>is this normal or should the answers be the same? </p>
  
  <p>The statement I'm using to compute the Euclidean distance is:</p>
  
  <pre><code>distance = (int) Math.sqrt(   (rgb1.getR()-rgb2.getR())^2
                              + (rgb1.getG()-rgb2.getG())^2
                              + (rgb1.getB()-rgb2.getB())^2
                            );
  </code></pre>