title: JavaScript math calculation
body: <p>I need to perform a math calculation in JavaScript that I am unsure how to do so.</p>
  
  <p>The formula is as follows: </p>
  
  <pre><code>result = (scale * weighting) / 2
  </code></pre>
  
  <p>where the result I will need to two decimal places.</p>
  
  <p>Example formula that I need to do in JavaScript might be:</p>
  
  <pre><code>result = ((3 * 2) + (2 * 1.5)) / 2
  </code></pre>
  
  <p>I am also unsure if I have to also convert this to int.</p>