title: Tapering/Rounding decimal answers JS calculations
body: <p>Using JS to run a simple formula, but like many JS calculations I've made before the decimal answers go on for way longer than I'd like and make it look sloppy.</p>
  
  <p>Is there I way I can force the calculation to stop at a certain decimal place or force a round up from there?</p>
  
  <p>Thanks!</p>
  
  <pre><code>    &lt;script&gt;
      var $u = $('input[name=u]');
      var $a = $('input[name=a]');
      var $h = $('input[name=h]');
      $u.on('keyup',function() {
          var u = +$u.val();
          var a = +$a.val();
          $h.val(u*4.605+a*1.308+28.003).toFixed(1);
      });
      $a.on('keyup',function() {
          var u = +$u.val();
          var a = +$a.val();
          $h.val(u*4.605+a*1.308+28.003).toFixed(1);
      });
  
      &lt;/script&gt;
  </code></pre>