# Vector2.CubicBezier

```csharp
static Vector2 CubicBezier(in Vector2 source, in Vector2 target, in Vector2 sourceTangent, in Vector2 targetTangent, float t)
```

Calculates position of a point on a cubic bezier curve at given fraction.

### Parameters

- `in source` (`Vector2`): Point A of the curve.
- `in target` (`Vector2`): Point B of the curve.
- `in sourceTangent` (`Vector2`): Tangent for the Point A.
- `in targetTangent` (`Vector2`): Tangent for the Point B.
- `t` (`float`): How far along the path to get a point on. Range is 0 to 1, inclusive.

### Returns

`Vector2`: The point on the curve

Declared in [Vector2](/api/Vector2).
Assembly: `Sandbox.System`.
