Scratch for Java

Operators::lerp()

Calculates a number between two numbers at a specific increment. The amt parameter is the amount to interpolate between the two values where 0.0 equal to the first point, 0.1 is very near the first point, 0.5 is half-way in between, etc. The lerp function is convenient for creating motion along a straight path and for drawing dotted lines.

Syntax

Java

.lerp(start, stop, amt)

Parameters

Name Data Type Description
start double first value
stop double second value
amt double double between 0.0 and 1.0

Return

double

lerp()