Lerp

Linearly interpolates between the start and end values, where a factor of 0 gives the start value, 1 gives the end value, and 0.5 gives their midpoint.

With vec2 inputs, this traces the straight line path between the two points.

Interface

Inputs

ParameterDetailsPossible Types
Start

The value produced when the factor is 0.

Primary Input

Vec2[]
Vec2
f32[]
f32
f64[]
f64
End

The value produced when the factor is 1.

Default: 1

Vec2[]
Vec2
f32[]
f32
f64[]
f64
Factor

The mix between the start (at 0) and end (at 1) values.

Default: 0.5

f64[]
f64
Clamped

Whether to constrain the factor within 0 to 1, preventing extrapolation beyond the start and end values.

Default: true

bool[]
bool

Outputs

ProductDetailsPossible Types
Result

The value produced by the node operation.

Primary Output

f64
f64[]
f32
f32[]
Vec2
Vec2[]