Skip to content

Added new math operations #4

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

Merged
merged 24 commits into from
May 11, 2023
Merged

Added new math operations #4

merged 24 commits into from
May 11, 2023

Conversation

MartonioJunior
Copy link
Contributor

@MartonioJunior MartonioJunior commented May 10, 2023

All of these methods are based by the following GDC talk, as well as some utility methods I use on my personal projects

List of operations added:

  • approx(a ,b, tolerance)
  • arc(x)
  • arch2(x)
  • bitwave(x)
  • clamp01(x)
  • mix(a, b, weightB, t)
  • normal(x, zero, one)
  • pingpong(a, b, t)
  • sine(x)
  • smoothstart(t, n)
  • smoothstop(t, n)
  • snap(x, snap)
  • triwave(x)
  • xfade(a, b, t)

List of operations changed:

  • movetowards(current, target, distanceDelta): Streamlined formula to always run with the same number of operations
  • pingpong(x, length): Added new signatures to compose other types

@cr-gpt
Copy link

cr-gpt bot commented May 10, 2023

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@ltmx ltmx merged commit f8dffd3 into ltmx:master May 11, 2023
@ltmx
Copy link
Owner

ltmx commented May 21, 2023

All of these methods are based by the following GDC talk, as well as some utility methods I use on my personal projects

List of operations added:

  • approx(a ,b, tolerance)
  • arc(x)
  • arch2(x)
  • bitwave(x)
  • clamp01(x)
  • mix(a, b, weightB, t)
  • normal(x, zero, one)
  • pingpong(a, b, t)
  • sine(x)
  • smoothstart(t, n)
  • smoothstop(t, n)
  • snap(x, snap)
  • triwave(x)
  • xfade(a, b, t)

List of operations changed:

  • movetowards(current, target, distanceDelta): Streamlined formula to always run with the same number of operations
  • pingpong(x, length): Added new signatures to compose other types

Thank you a lot for your contribution fellow !
Feel free to do it again, I'll gladly implement your ideas ;)

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.

2 participants