# Sandbox.Curve.AddPoint

## Overload 1

```csharp
int AddPoint(float x, float y)
```

Add a new keyframe at given position to this curve.

### Parameters

- `x` (`float`): Position of the keyframe on the X axis.
- `y` (`float`): Position of the keyframe on the Y axis.

### Returns

`int`: The position of newly added keyframe in the [Sandbox.Curve.Frames](/api/Sandbox.Curve/Frames) list.

## Overload 2

```csharp
int AddPoint(in Frame keyframe)
```

Add given keyframe to this curve.

### Parameters

- `in keyframe` (`Frame`): The keyframe to add.

### Returns

`int`: The position of newly added keyframe in the [Sandbox.Curve.Frames](/api/Sandbox.Curve/Frames) list.

Declared in [Sandbox.Curve](/api/Sandbox.Curve).
Assembly: `Sandbox.System`.
