Lintner to Kolbach gives only positive results. Round Kolbach to Lintner to 3 decimals.

Sun, 20 Dec 2020 13:40:56 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 20 Dec 2020 13:40:56 +0100
changeset 724
66e0b4ef9268
parent 723
3a837905bbce
child 725
30346e5b9e12

Lintner to Kolbach gives only positive results. Round Kolbach to Lintner to 3 decimals.

www/js/global.js file | annotate | diff | comparison | revisions
--- a/www/js/global.js	Tue Oct 27 19:51:22 2020 +0100
+++ b/www/js/global.js	Sun Dec 20 13:40:56 2020 +0100
@@ -1186,12 +1186,15 @@
 
 
 function lintner_to_kolbach(lintner) {
+ var wk = (3.5 * lintner) - 16;
+ if (wk < 0)
+  return 0;
  return (3.5 * lintner) - 16;
 }
 
 
 function kolbach_to_lintner(kolbach) {
- return (kolbach + 16) / 3.5;
+ return Round((kolbach + 16) / 3.5, 3);
 }
 
 

mercurial