Прочетете на английски Редактиране

Споделяне чрез


Vector4.Lerp Method

Definition

Overloads

Lerp(Vector4, Vector4, Vector4)
Lerp(Vector4, Vector4, Single)

Performs a linear interpolation between two vectors based on the given weighting.

Lerp(Vector4, Vector4, Vector4)

C#
public static System.Numerics.Vector4 Lerp(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2, System.Numerics.Vector4 amount);

Parameters

value1
Vector4
value2
Vector4
amount
Vector4

Returns

Applies to

.NET 10 и .NET 9
Продукт Версии
.NET 9, 10

Lerp(Vector4, Vector4, Single)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Performs a linear interpolation between two vectors based on the given weighting.

C#
public static System.Numerics.Vector4 Lerp(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2, float amount);

Parameters

value1
Vector4

The first vector.

value2
Vector4

The second vector.

amount
Single

A value between 0 and 1 that indicates the weight of value2.

Returns

The interpolated vector.

Remarks

The behavior of this method changed in .NET 5. For more information, see Behavior change for Vector2.Lerp and Vector4.Lerp.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1
UWP 10.0