Skip to content

Commit

Permalink
Tighter property use, comment clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
knod committed Dec 5, 2018
1 parent c087645 commit 0df18f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ let toMonthlyAmount = {};
toMonthlyAmount.weekly = function (evnt, weeklyVal) {

let monthlyRaw = weeklyVal * (4 + 1 / 3),
monthly = toMonthlyAmount[ `monthly` ](evnt, monthlyRaw);
monthly = toMonthlyAmount.monthly(evnt, monthlyRaw);
return monthly;

};
Expand All @@ -79,11 +79,13 @@ toMonthlyAmount.monthly = function (evnt, monthlyVal) {
};


/** @see {@link https://docs.google.com/document/d/13kb1hsxMi6pN9oAUGsTatDz4OSX5IeDLF9B-ddPjMCk/edit#heading=h.hxz256tmbsz9} */
/** For what we used to guide the math of what counts as a month,
* @see {@link https://docs.google.com/document/d/13kb1hsxMi6pN9oAUGsTatDz4OSX5IeDLF9B-ddPjMCk/edit#heading=h.hxz256tmbsz9}
*/
toMonthlyAmount.yearly = function (evnt, yearlyVal) {

let monthlyRaw = (yearlyVal / 12),
monthly = toMonthlyAmount[ `monthly` ](evnt, monthlyRaw);
monthly = toMonthlyAmount.monthly(evnt, monthlyRaw);
return monthly;

};
Expand Down

0 comments on commit 0df18f9

Please sign in to comment.