IFloatingPointIeee754<TSelf>.Lerp(TSelf, TSelf, TSelf) Method

Definition

Performs a linear interpolation between two values based on the given weight.

C#
public static virtual TSelf Lerp(TSelf value1, TSelf value2, TSelf amount);

Parameters

value1
TSelf

The first value, which is intended to be the lower bound.

value2
TSelf

The second value, which is intended to be the upper bound.

amount
TSelf

A value, intended to be between 0 and 1, that indicates the weight of the interpolation.

Returns

TSelf

The interpolated value.

Remarks

This method presumes inputs are well formed and does not validate that value1 < value2 nor that 0 <= amount <= 1.

Applies to

Proizvod Verzije
.NET 8, 9, 10