Skip to content

Instantly share code, notes, and snippets.

@rgruesbeck
Created October 3, 2019 00:15
Show Gist options
  • Save rgruesbeck/aaae9f57e7ead6701dceafe172336c2d to your computer and use it in GitHub Desktop.
Save rgruesbeck/aaae9f57e7ead6701dceafe172336c2d to your computer and use it in GitHub Desktop.
calcs
# Loan Calc
principle, interestRate, loanLength
principle * (interestRate / (1 - (1 + interestRate) ** -loanLength))
Loan Amount, Monthly Interest Rate (1% = 0.01), Loan Length in Months
Per Month
# Solar Panel Calc
totalWHr, sunHours, conversionLoss, panelOutput
Math.ceil(((totalWHr / sunHours) * (1 + conversionLoss) ) / panelOutput)
Total Desired Watts/Hour, Hours or Sunlight, Conversion Loss (1% = 0.01), Panel Output in Watts
Panels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment