API

Function dampScalar

  • Blend a scalar toward a goal by weight t.

    Parameters

    • current: number

      The current value.

    • goal: number

      The goal value.

    • t: number

      The interpolation weight (typically from expDampFactor).

    Returns number

    current + (goal - current) * t.