Skip to content

Added new math operations#4

Merged
ltmx merged 24 commits into
ltmx:masterfrom
MartonioJunior:master
May 11, 2023
Merged

Added new math operations#4
ltmx merged 24 commits into
ltmx:masterfrom
MartonioJunior:master

Conversation

@MartonioJunior
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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