# Vector4.Lerp

## Overload 1

```csharp
static Vector4 Lerp(Vector4 a, Vector4 b, float frac, bool clamp = True)
```

Performs linear interpolation between 2 given vectors.

### Parameters

- `a` (`Vector4`): Vector A
- `b` (`Vector4`): Vector B
- `frac` (`float`): Fraction, where 0 would return Vector A, 0.5 would return a point between the 2 vectors, and 1 would return Vector B.
- `clamp` (`bool`), default `True`: Whether to clamp the fraction argument between [0,1]

### Returns

`Vector4`

## Overload 2

```csharp
static Vector4 Lerp(in Vector4 a, in Vector4 b, Vector4 frac, bool clamp = True)
```

Performs linear interpolation between 2 given vectors, using a vector for the fraction on each axis.

### Parameters

- `in a` (`Vector4`): Vector A
- `in b` (`Vector4`): Vector B
- `frac` (`Vector4`): Fraction for each axis, where 0 would return Vector A, 0.5 would return a point between the 2 vectors, and 1 would return Vector B.
- `clamp` (`bool`), default `True`: Whether to clamp the fraction argument between [0,1] on each axis

### Returns

`Vector4`

Declared in [Vector4](/api/Vector4).
Assembly: `Sandbox.System`.
