# LuaCurveObjectAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/LuaCurveObjectAPI

## Functions

### AddPoint

```lua
self:AddPoint(pointX, pointY)
```

Adds a single point to the curve.

Arguments:
- `pointX`: number
- `pointY`: number

### ClearPoints

```lua
self:ClearPoints()
```

Removes all points from the curve. Evaluating an empty curve always yields a zero value.

### Copy

```lua
curve = self:Copy()
```

Returns a new copy of this curve.

Returns:
- `curve`: LuaCurveObject

### Evaluate

```lua
y = self:Evaluate(x)
```

Returns a calculated 'y' value from the configured curve points.

Arguments:
- `x`: number

Returns:
- `y`: number

### GetPoint

```lua
point = self:GetPoint(index)
```

Returns the vector for an individual point index on the curve.

Arguments:
- `index`: luaIndex

Returns:
- `point`: vector2, may be nil

### GetPointCount

```lua
count = self:GetPointCount()
```

Returns the total number of points on the curve.

Returns:
- `count`: size

### GetPoints

```lua
point = self:GetPoints()
```

Returns the vectors for all points on the curve.

Returns:
- `point`: vector2[]

### RemovePoint

```lua
self:RemovePoint(index)
```

Removes a single point from the curve. Raises an error if the supplied point index is out of range.

Arguments:
- `index`: luaIndex

### SetPoints

```lua
self:SetPoints(point)
```

Replaces all points on the curve.

Arguments:
- `point`: vector2[]

### SetToDefaults

```lua
self:SetToDefaults()
```

Resets all state on the curve, and clears the secret values flag.

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
