From: Steinar H. Gunderson Date: Thu, 27 Jul 2023 14:30:35 +0000 (+0200) Subject: Two decimals is a bit too hardcore for possession times. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=655991d5951123173cb88509c18eddb9abcd0ef4;p=pkanalytics Two decimals is a bit too hardcore for possession times. --- diff --git a/ultimate.js b/ultimate.js index f782e75..6c066bc 100644 --- a/ultimate.js +++ b/ultimate.js @@ -116,6 +116,8 @@ function add_3cell_ci(tr, ci) { let text; if (ci.format === 'percentage') { text = (100 * ci.val).toFixed(0) + '%'; + } else if (ci.decimals !== undefined) { + text = ci.val.toFixed(ci.decimals); } else { text = ci.val.toFixed(2); } @@ -998,6 +1000,7 @@ function make_ci_duration(vals, z) 'desired': 0.0, 'inverted': false, 'unit': 'sec', + 'decimals': 1, }; }