Skip to content
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

Added math.lerp to the math library documentation #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RobIux
Copy link

@RobIux RobIux commented Jan 10, 2025

Updated _pages/library.md to include the recently added PR.

Copy link
Collaborator

@vegorov-rbx vegorov-rbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter names are atypical and thus incorrect.

Description doesn't match what the function is actually doing.

@RobIux
Copy link
Author

RobIux commented Jan 10, 2025

Do I use a, b and t?

@RobIux RobIux requested a review from vegorov-rbx January 10, 2025 12:11
@vegorov-rbx
Copy link
Collaborator

Yes, you can check the https://rfcs.luau.org/function-math-lerp.html for definition details.

Your documented formula doesn't match how lerp is implemented in Luau, which can confuse the users about the function guarantees.
Although the real formula might also appear unfamiliar for why it's defined that way, but maybe it can be cleared up with a short second sentence.

@RobIux
Copy link
Author

RobIux commented Jan 10, 2025

Alr I'll add those changes as soon as I can.

@RobIux
Copy link
Author

RobIux commented Jan 10, 2025

I'm a bit confused with what you ment with "Your documented formula doesn't match how lerp is implemented in Luau" I've checked the way and it uses my formula.
I did add a note stating the early return if the value of t is 1 if that's what you were implying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants