Lerp
Linearly interpolates between two vectors.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
Lerp(Vector4, Vector4, float)
Linearly interpolates between two vectors.
public static Vector4 Lerp(Vector4 a, Vector4 b, float t)
Parameters
Returns
Type | Description |
|---|---|
| Vector4 | When |
Remarks
Interpolates between and by amount .
abtThe parameter is clamped between [0...1].
tWhen = 0 returns .
taWhen = 1 returns .
tbWhen = 0.5 returns the midpoint of and .
tabAdditional Resources: Vector4.LerpUnclamped.
Lerp(Vector4, Vector4, float)
Linearly interpolates between two vectors.
public static Vector4 Lerp(in Vector4 a, in Vector4 b, float t)
Parameters
Returns
Type | Description |
|---|---|
| Vector4 | When |
Remarks
Interpolates between and by amount .
abtThe parameter is clamped between [0...1].
tWhen = 0 returns .
taWhen = 1 returns .
tbWhen = 0.5 returns the midpoint of and .
tabAdditional Resources: Vector4.LerpUnclamped.