C# Lerping from position to position
问题 I need to make a picture box to lerp from position to position (like you can do that in unity). How can I do that , is there a built-in function? thanks :) 回答1: Linear interpolation (lerp) is actually a pretty easy function to implement. The equation is float Lerp(float firstFloat, float secondFloat, float by) { return firstFloat * (1 - by) + secondFloat * by; } A higher order Lerp just wraps lower order lerps: Vector2 Lerp(Vector2 firstVector, Vector2 secondVector, float by) { float retX =