-
-
Notifications
You must be signed in to change notification settings - Fork 20.9k
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
Implement cubic_interpolate()
as MathFunc for refactoring
#57954
Implement cubic_interpolate()
as MathFunc for refactoring
#57954
Conversation
cubic_interpolate()
as MathFunc to refactorcubic_interpolate()
as MathFunc for refactoring
cce2228
to
1032c0d
Compare
1032c0d
to
69623ba
Compare
69623ba
to
c38651f
Compare
908ec7f
to
411882f
Compare
411882f
to
865da09
Compare
I'd recommend calling it cubic_lerp instead to be in par with lerp function. |
@sairam4123 The "l" in "lerp" stands for "linear" so "cubic_lerp" would not be an appropriate name. We discussed the naming back when "lerp" was called "linear_interpolate" and decided to shorten it to "lerp", but "cubic_interpolate" does not have a common shortened version, "cerp" would sounds weird. |
As aaronfranke said right, lerp is an abbreviation for linear-interpolate. If you want to make a comparison, it would be more correct to make |
But there is slerp, so I thought cubic_lerp could work.
… The "l" in "lerp" stands for "linear" so "cubic_lerp" would not be an appropriate name. We discussed the naming back when "lerp" was called "linear_interpolate" and decided to shorten it to "lerp", but "cubic_interpolate" does not have a common shortened version, "cerp" would sounds weird.
|
Thanks! |
Implement
cubic_interpolate()
as built-in math function for refactoring animation and anywhere.This is the first step in solving #57952. We need to change the formula to solve #57952 completely, but since there were many duplicated formulas, this change put them in one place.