Vector2.Lerp 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Lerp(Vector2, Vector2, Vector2) |
根據給定權重,在兩個向量間進行線性插值。 |
| Lerp(Vector2, Vector2, Single) |
根據給定權重,在兩個向量間進行線性插值。 |
Lerp(Vector2, Vector2, Vector2)
- 來源:
- Vector2.cs
- 來源:
- Vector2.cs
- 來源:
- Vector2.cs
根據給定權重,在兩個向量間進行線性插值。
public:
static System::Numerics::Vector2 Lerp(System::Numerics::Vector2 value1, System::Numerics::Vector2 value2, System::Numerics::Vector2 amount);
public static System.Numerics.Vector2 Lerp(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2, System.Numerics.Vector2 amount);
static member Lerp : System.Numerics.Vector2 * System.Numerics.Vector2 * System.Numerics.Vector2 -> System.Numerics.Vector2
Public Shared Function Lerp (value1 As Vector2, value2 As Vector2, amount As Vector2) As Vector2
參數
- value1
- Vector2
- value2
- Vector2
- amount
- Vector2
介於 0 到 1 之間的值,表示 的 y權重。
傳回
插值向量。
適用於
Lerp(Vector2, Vector2, Single)
- 來源:
- Vector2.cs
- 來源:
- Vector2.cs
- 來源:
- Vector2.cs
- 來源:
- Vector2.cs
- 來源:
- Vector2.cs
根據給定權重,在兩個向量間進行線性插值。
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 的行為變更。