⚠ Preview docs — built from the develop branch and may be unstable. Go to the stable docs.

Vec2.Lerp

static Vec2 Lerp(Vec2 a, Vec2 b, float blend)

Blends (Linear Interpolation) between two vectors, based on a ‘blend’ value, where 0 is a, and 1 is b. Doesn’t clamp percent for you.

   
Vec2 a First item in the blend, or ‘0.0’ blend.
Vec2 b Second item in the blend, or ‘1.0’ blend.
float blend A blend value between 0 and 1. Can be outside this range, it’ll just interpolate outside of the a, b range.
RETURNS: Vec2 An unclamped blend of a and b.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!