interpolateAlongPath

fun interpolateAlongPath(endPosition: Position, pathType: PathType, amount: Double, result: Position): Position

Compute a position along a path between two positions. The amount indicates the fraction of the path at which to compute a position. This value is typically between 0 and 1, where 0 indicates the begin position (this position) and 1 indicates the end position.

Return

the result argument set to the computed position

Parameters

endPosition

the path's end position

pathType

PathType indicating type of path to assume

amount

the fraction of the path at which to compute a position

result

a pre-allocated Position in which to return the computed result