@writegames.com/game-math
    Preparing search index...

    Function approach

    • Approaches a target value by an amount without overshooting the target.

      Parameters

      • from: number

        Input value

      • to: number

        Target value

      • amount: number

        Amount to approach

      Returns number