Created
November 22, 2017 05:51
-
-
Save codeniko/963f47b0ecc139ce0274ae2dea8f56b9 to your computer and use it in GitHub Desktop.
Intake calorie calculator for adult neutered cats
This file contains hidden or 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
| #!/usr/local/bin/node | |
| // formula from: https://vet.osu.edu/vmc/companion/our-services/nutrition-support-service/basic-calorie-calculator | |
| const args = process.argv | |
| if (args.length !== 3) { | |
| console.log(`./${__filename} POUNDS`) | |
| return 1 | |
| } | |
| const pounds = process.argv[2] | |
| const kg = (pounds / 2.20462) | |
| const rer = Math.pow(kg, .75) * 70 | |
| const calToMaintainWeight = rer * 1.6 // for neutered adult | |
| console.log(`lb=${pounds} kg=${kg.toFixed(2)} RER=${rer.toFixed(2)}, RER*1.6=${calToMaintainWeight.toFixed(2)}`) | |
| return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment