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
### Keybase proof | |
I hereby claim: | |
* I am drakonka on github. | |
* I am drakonka (https://keybase.io/drakonka) on keybase. | |
* I have a public key whose fingerprint is 6C12 115E B01B 0608 B4BB CC6B 50EA 6EE6 961B BA8B | |
To claim this, I am signing this object: |
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
<?php | |
function depleteEnergy($interval) { | |
Log::info('depleting snail energy. Snail ID: ' . $this->snailID); | |
// convert calories to Joules | |
// CurrentRMR is in JOULES | |
// Here we convert the target RMR (which is Joules to deplete PER HOUR) to Carbohydrates, Fat, and Protein. Then we multiply that by the Interval at which this job runs after converting it to hours. | |
$carbsToDeplete = Utility::JoulesToCarbs(Utility::CalcTargetPercentageValue($this->carbohydratesIdealPercentage, $this->currentRMR)) * Utility::SecondsToHours($interval); | |
$fatToDeplete = Utility::JoulesToFat(Utility::CalcTargetPercentageValue($this->fatIdealPercentage, $this->currentRMR)) * Utility::SecondsToHours($interval); |