Skip to content

Instantly share code, notes, and snippets.

public static Vector3 ExpDecay(Vector3 a, Vector3 b, float decay, float dt)
{
return b + (a - b) * Mathf.Exp(-decay * dt);
}
using UnityEngine;
public static class Utils
{
/*
*
* https://allenchou.net/2015/04/game-math-precise-control-over-numeric-springing/
*
* x - value
* v - velocity