community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864102 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/generators.js wizard.js
Date Wed, 31 Jul 2019 20:09:14 GMT
Author: humbedooh
Date: Wed Jul 31 20:09:14 2019
New Revision: 1864102

URL: http://svn.apache.org/viewvc?rev=1864102&view=rev
Log:
tweak fraction condensing (just winging it, have not given it too much thought)

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js?rev=1864102&r1=1864101&r2=1864102&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js Wed Jul 31 20:09:14
2019
@@ -34,16 +34,19 @@ function generate_pmc_roster(data) {
     l = lcm(y1, y2);
     x1 = l/y2;
     x2 = l/y1;
-    while (x1 >= 8) {
-        x1 /= 2;
-        x2 /= 2;
+    while (x1 >= 10) {
+        x1 /= 1.25;
+        x2 /= 1.25;
     }
     x1 = Math.round(x1)
     x2 = Math.round(x2)
-    while ((x1 > 1 && x1 == x2) || (Math.floor(x1) == Math.floor(x2*2) &&
x2 > 1)) {
-        x1 /= 2
-        x2 /= 2
+    
+    while ((x1/x2) == Math.floor(x1/x2) && x2 > 1) {
+        let k = (x1/x2)
+        x1 /= k
+        x2 /= k
     }
+    
     txt += "There are currently %u committers and %u PMC members in this project (%u:%u committer-to-pmc
ratio).\n\n".format(no_com, no_pmc, x1, x2);
     
     

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1864102&r1=1864101&r2=1864102&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Wed Jul 31 20:09:14 2019
@@ -1022,16 +1022,19 @@ function generate_pmc_roster(data) {
     l = lcm(y1, y2);
     x1 = l/y2;
     x2 = l/y1;
-    while (x1 >= 8) {
-        x1 /= 2;
-        x2 /= 2;
+    while (x1 >= 10) {
+        x1 /= 1.25;
+        x2 /= 1.25;
     }
     x1 = Math.round(x1)
     x2 = Math.round(x2)
-    while ((x1 > 1 && x1 == x2) || (Math.floor(x1) == Math.floor(x2*2) &&
x2 > 1)) {
-        x1 /= 2
-        x2 /= 2
+    
+    while ((x1/x2) == Math.floor(x1/x2) && x2 > 1) {
+        let k = (x1/x2)
+        x1 /= k
+        x2 /= k
     }
+    
     txt += "There are currently %u committers and %u PMC members in this project (%u:%u committer-to-pmc
ratio).\n\n".format(no_com, no_pmc, x1, x2);
     
     



Mime
View raw message