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

Clean up interpolation functions #2717

Merged
merged 4 commits into from
Aug 12, 2023
Merged

Clean up interpolation functions #2717

merged 4 commits into from
Aug 12, 2023

Conversation

Denneisk
Copy link
Member

@Denneisk Denneisk commented Aug 9, 2023

Cleans up interpolation functions, minor optimizations, and adds one new function (bezier(vvvn)) taking advantage of newly released bezier functions.

This PR should be delayed until widespread adoption of the latest Gmod update has occurred.

Would like to mention #2716 as I had intended to add a replacement function lerp(...) but wasn't sure if I should just replace the original mix to the peril of any previous users.

Test code


for i = 0,30 do
if bit.band(n, (2^i)) ~= 0 then
if bit.band(n, 2 ^ i) ~= 0 then
Copy link
Contributor

Choose a reason for hiding this comment

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

2^i should be bit.lshift(1,i)

@Denneisk
Copy link
Member Author

Would you mind if I also converted some of the vector functions to use the Gmod functions instead while I'm at it? I found it marginally better while benchmarking.

@thegrb93
Copy link
Contributor

Do a new PR for those

@Vurv78
Copy link
Contributor

Vurv78 commented Aug 12, 2023

oops, accidentally caused merge conflict with fixing lints on the print pr

@Vurv78 Vurv78 merged commit 4d4cc55 into wiremod:master Aug 12, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants