Skip to content

ever-balance/wilks-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wilks-calculator

This library calculates performs calculations with the Wilks coefficient, which is a coefficient used by the International Powerlifting Federation to determine the relative strength of competitors. They also use this coefficient for determining the qualification requirements for championships.

Build Status npm version Coverage Status

Installation

npm install wilks-calculator

Usage

const wilksCalculator = require('wilks-calculator')

wilksCalculator.calculateWilksScore(gender, bodyWeight, liftedWeight, [unitType]);
  • gender (string) - 'm' for Male and 'f' for Female
  • bodyWeight (number)
  • liftedWeight (number)
  • unitType (string) - 'metric' or 'imperial' (optional)
wilksCalculator.calculateWeightToLift(gender, bodyWeight, wilksScore, [unitType]);
  • gender (string) - 'm' for Male and 'f' for Female
  • bodyWeight (number)
  • wilksScore (number)
  • unitType (string) - 'metric' or 'imperial' (optional)
wilksCalculator.calculateNeededBodyWeight(gender, liftedWeight, wilksScore, [unitType]);
  • gender (string) - 'm' for Male and 'f' for Female
  • liftedWeight (number)
  • wilksScore (number)
  • unitType (string) - 'metric' or 'imperial' (optional)

Examples

calculateWilksScore

var femaleWilksScore = calculateWilksScore('f', 60, 300);
// Returns 334.47

var maleWilksScore = calculateWilksScore('m', 90, 500);
// Returns 319.20

var femaleImperialWilksScore = calculateWilksScore('f', 132, 660, 'imperial');
// Returns 334.31

var maleImperialWilksScore = calculateWilksScore('m', 176, 882, 'imperial');
// Returns 273.49

calculateWeightToLift

var femaleTotal = calculateWeightToLift('f', 60, 350);
// Returns 313.93 (kg)

var maleTotal = calculateWeightToLift('m', 80, 350);
// Returns 512.67 (kg)

var femaleImperialTotal = calculateWeightToLift('f', 132, 660, 'imperial');
// Returns 690.97 (lbs)

var maleImperialTotal = calculateWeightToLift('m', 176, 350, 'imperial');
// Returns 1128.74 (lbs)

calculateNeededBodyWeight

var femaleBodyWeight = calculateNeededBodyWeight('f', 300, 350);
// Returns 56.6 (kg)

var maleBodyWeight = calculateNeededBodyWeight('m', 600, 350);
// Returns 113.2 (kg)

var femaleImperialBodyWeight = calculateNeededBodyWeight('f', 690, 660, 'imperial');
// Returns 131.62 (lbs)

var maleImperialBodyWeight = calculateNeededBodyWeight('m', 1128, 350, 'imperial');
// Returns 175.70 (lbs)

Tests

npm test

About

This library calculates performs calculations with the Wilks coefficient.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published