Vector2.Lerp Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Lerp(Vector2, Vector2, Single) |
Performs a linear interpolation between two vectors based on the given weighting. |
Lerp(Vector2, Vector2, Vector2) |
Lerp(Vector2, Vector2, Single)
- Source:
- Vector2.cs
- Source:
- Vector2.cs
- Source:
- Vector2.cs
Performs a linear interpolation between two vectors based on the given weighting.
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
Parameters
- value1
- Vector2
The first vector.
- value2
- Vector2
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
Lerp(Vector2, Vector2, Vector2)
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
Parameters
- value1
- Vector2
- value2
- Vector2
- amount
- Vector2
Returns
Applies to
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ