Why do these two code fragments differ
<p>I just noticed that when I change the last line in the code fragment from <code>potential =+ rep_pot</code>  to <code>potential = potential + rep_pot</code>, I get completely different behaviour. Has anybody got any idea why this is happening?</p>

<pre><code>double potential = euclideanDistance(i, goal);
for (IntPoint h: hits){
    double dist = euclideanDistance(i, h);
    double a = range - dist;
    double rep_pot = (Math.exp(-1/a)) / dist;
    potential =+ rep_pot;
}
</code></pre>
