/// <summary> /// Creates a new <see cref="Vector2f"/> that contains CatmullRom interpolation of the specified vectors. /// </summary> /// <param name="value1">The first vector in interpolation.</param> /// <param name="value2">The second vector in interpolation.</param> /// <param name="value3">The third vector in interpolation.</param> /// <param name="value4">The fourth vector in interpolation.</param> /// <param name="amount">Weighting factor.</param> /// <param name="result">The result of CatmullRom interpolation as an output parameter.</param> public static void CatmullRom(ref Vector2f value1, ref Vector2f value2, ref Vector2f value3, ref Vector2f value4, float amount, out Vector2f result) { result.X = Maths.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount); result.Y = Maths.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount); }
/// <summary> /// Creates a new <see cref="Vector2f"/> that contains CatmullRom interpolation of the specified vectors. /// </summary> /// <param name="value1">The first vector in interpolation.</param> /// <param name="value2">The second vector in interpolation.</param> /// <param name="value3">The third vector in interpolation.</param> /// <param name="value4">The fourth vector in interpolation.</param> /// <param name="amount">Weighting factor.</param> /// <returns>The result of CatmullRom interpolation.</returns> public static Vector2f CatmullRom(Vector2f value1, Vector2f value2, Vector2f value3, Vector2f value4, float amount) { return(new Vector2f( Maths.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount), Maths.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount))); }