> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::pose_tree_math::interpolate

> Linear interpolation between two values.

```cpp showLineNumbers={false}
template <typename K, typename T>
T holoscan::pose_tree_math::interpolate(
    K q,
    T a,
    T b
)
```

Linear interpolation between two values.

Returns a value between a and b at the relative position q. This function will also work for q outside of the unit interval for extrapolation.

**Returns:** Interpolated value a + q \* (b - a).

**Template parameters**

**`K`** `typename`

Scalar type for interpolation parameter.

---

**`T`** `typename`

Type of values to interpolate.

---

**Parameters**

**`q`** `K`

Interpolation parameter (0.0 returns a, 1.0 returns b).

---

**`a`** `T`

First value.

---

**`b`** `T`

Second value.

---