Пример #1
0
 /// <summary>
 /// Creates a new <see cref="Vector2f"/> that contains linear interpolation of the specified vectors.
 /// </summary>
 /// <param name="value1">The first vector.</param>
 /// <param name="value2">The second vector.</param>
 /// <param name="amount">Weighting value(between 0.0 and 1.0).</param>
 /// <param name="result">The result of linear interpolation of the specified vectors as an output parameter.</param>
 public static void Lerp(ref Vector2f value1, ref Vector2f value2, float amount, out Vector2f result)
 {
     result.X = Maths.Lerp(value1.X, value2.X, amount);
     result.Y = Maths.Lerp(value1.Y, value2.Y, amount);
 }
Пример #2
0
 /// <summary>
 /// Creates a new <see cref="Vector2f"/> that contains linear interpolation of the specified vectors.
 /// </summary>
 /// <param name="value1">The first vector.</param>
 /// <param name="value2">The second vector.</param>
 /// <param name="amount">Weighting value(between 0.0 and 1.0).</param>
 /// <returns>The result of linear interpolation of the specified vectors.</returns>
 public static Vector2f Lerp(Vector2f value1, Vector2f value2, float amount)
 {
     return(new Vector2f(
                Maths.Lerp(value1.X, value2.X, amount),
                Maths.Lerp(value1.Y, value2.Y, amount)));
 }