title: Datatables. How to roundup to 1 decimal point?
body: <p>I'm using the DataTables jQuery plugin. I'm using the <code>footerCallback</code> function and I have managed to get the total of a column in my table. How do I then roundup the resulting total to 1 decimal point? Eg, 23.1.</p>
  
  <p>This is the <code>footerCallback</code> code I'm using:</p>
  
  <pre><code>var table_companies = $('#table_companies').dataTable({
  "ajax": "data.php?job=get_companies",
  "sDom": '&lt;"top"&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;',
  "pagingType": "full_numbers",
  "autoWidth": true,
  "searching": false,
      "footerCallback": function ( row, data, start, end, display ) {
          var api = this.api(), data;
  
          // Remove the formatting to get integer data for summation
          var intVal = function ( i ) {
              return typeof i === 'string' ?
                  i.replace(/[\$,]/g, '')*1 :
                  typeof i === 'number' ?
                      i : 0;
          };
  
          // Total over all pages
          total = api
              .column( 6 )
              .data()
              .reduce( function (a, b) {
                  return intVal(a) + intVal(b);
              }, 0 );
  
          // Total over this page
          pageTotal = api
              .column( 6, { page: 'current'} )
              .data()
              .reduce( function (a, b) {
                  return intVal(a) + intVal(b);
              }, 0 );
  
          // Update footer
          $( api.column( 6 ).footer() ).html(
              + total
          );
  </code></pre>