public static Lerp ( Vector2 start, Vector2 end, float interpolationAmount ) : Vector2 | ||
start | Vector2 | |
end | Vector2 | |
interpolationAmount | float | |
return | Vector2 |
public static Vector2 Lerp(Vector2 start, Vector2 end, float interpolationAmount)
{
float startAmount = 1 - interpolationAmount;
return new Vector2
(
(start.X * startAmount) + (end.X * interpolationAmount),
(start.Y * startAmount) + (end.Y * interpolationAmount)
);
}
Vector2::Lerp ( Vector2 &start, Vector2 &end, float interpolationAmount, Vector2 &result ) : void |