javascript squared
<p>What is better to use in javascript to square some value. <br>
Math.pow </p>

<pre><code>Math.pow((circle2.x - circle1.x), 2)
</code></pre>

<p>Or my own function</p>

<pre><code>square(circle2.x - circle1.x);

function square(a){
    return a*a;
}
</code></pre>
