Skip to content

Instantly share code, notes, and snippets.

@joonatansir
Created February 11, 2025 19:34
Show Gist options
  • Select an option

  • Save joonatansir/1e8c9c7e2a32252c0881fbf43ee6b6df to your computer and use it in GitHub Desktop.

Select an option

Save joonatansir/1e8c9c7e2a32252c0881fbf43ee6b6df to your computer and use it in GitHub Desktop.
public static Vector3 ExpDecay(Vector3 a, Vector3 b, float decay, float dt)
{
return b + (a - b) * Mathf.Exp(-decay * dt);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment