Function lerpVector

  • Linear interpolation between 2 points. Moves the input point with lerpFactor towards the end point value.

    Parameters

    • point: Vector2

      The point to move.

    • endX: number

      The x value to move towards.

    • endY: number

      The y value to move towards.

    • lerpFactor: number = 0.1

      The percentage amount to move. A value between 0 and 1.

    • lock: number = 0.001

      If the distance between from and to is smaller than lock, the return value will snap to end.

    Returns void