---
title: "lerp(from:to:t:)"
framework: spatial
role: symbol
role_heading: Type Method
path: "spatial/vector3dfloat/lerp(from:to:t:)"
---

# lerp(from:to:t:)

Returns a Spatial vector that represents the linear interpolation at t between two vectors.

## Declaration

```swift
static func lerp(from: Vector3DFloat, to: Vector3DFloat, t: Vector3DFloat) -> Vector3DFloat
```

## Parameters

- `from`: The starting vector.
- `to`: The ending vector.
- `t`: The value, between 0 and 1, that the function interpolates at.

## Return Value

Return Value A new rotation. When t=0, the result is the from vector. When t=1.0, the result is the to vector. For any other value of t, the result is a linear linear interpolation between the two vectors.
