Last active
April 9, 2018 07:12
-
-
Save afahy/64e6360c078267df0277079f4bb188f7 to your computer and use it in GitHub Desktop.
Calculate Wilks coefficient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Calculate Wilks Coefficient to compare Powerlifting totals across bodyweights | |
https://en.wikipedia.org/wiki/Wilks_Coefficient | |
wilks(#body_weight, female?); | |
*/ | |
const men = [ | |
-216.0475144, | |
16.2606339, | |
-0.002388645, | |
-0.00113732, | |
7.01863E-06, | |
-1.291E-08 | |
]; | |
const women = [ | |
594.31747775582, | |
-27.23842536447, | |
0.82112226871, | |
-0.00930733913, | |
0.00004731582, | |
-0.00000009054 | |
]; | |
const factor = (coeff, w) => ( | |
coeff.reduce((p, c, i) => p + (c * Math.pow(w, i))) | |
); | |
const wilks = (weight, female) => { | |
return (500 / factor(female ? women : men, weight)); | |
}; | |
export default wilks; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment