-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update Fairhold formula with new linear one #145
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
app/models/Fairhold.ts
Outdated
math.cos((2 * math.pi * this.affordability) / this.length) + | ||
this.position; | ||
|
||
const discountLand = math.max(-1.1 * this.affordability + 0.7, 0.15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would still be worth making these magic numbers constants, just for documentation and readability.
I agree if they're not variables, we don't need to pass them into the class or have them as properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, forgot about that whole readability thing! New commit should take care of this.
@@ -16,7 +21,7 @@ export class Fairhold { | |||
} | |||
|
|||
private calculateFairholdDiscount() { | |||
const discountLand = math.max(-1.1 * this.affordability + 0.7, 0.15) | |||
const discountLand = math.max(MULTIPLIER * this.affordability + OFFSET, PLATEAU) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer!
What does this PR do?
Why?