Vector2.Lerp(Vector2, Vector2, Single) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
基于给定权重在两个向量之间执行线性内插。
public:
static System::Numerics::Vector2 Lerp(System::Numerics::Vector2 value1, System::Numerics::Vector2 value2, float amount);
public static System.Numerics.Vector2 Lerp (System.Numerics.Vector2 value1, System.Numerics.Vector2 value2, float amount);
static member Lerp : System.Numerics.Vector2 * System.Numerics.Vector2 * single -> System.Numerics.Vector2
Public Shared Function Lerp (value1 As Vector2, value2 As Vector2, amount As Single) As Vector2
参数
- value1
- Vector2
第一个向量。
- value2
- Vector2
第二个向量。
- amount
- Single
一个介于 0 与 1 之间的值,指示 value2
的权重。
返回
内插的向量。
注解
此方法的行为在 .NET 5 中已更改。 有关详细信息,请参阅 Vector2.Lerp 和 Vector4.Lerp 的行为更改。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈