/// <summary>
/// Creates a new <see cref="Vector2"/> that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle.
/// </summary>
/// <param name="value1">The first vector of 2d-triangle.</param>
/// <param name="value2">The second vector of 2d-triangle.</param>
/// <param name="value3">The third vector of 2d-triangle.</param>
/// <param name="amount1">Barycentric scalar <c>b2</c> which represents a weighting factor towards second vector of 2d-triangle.</param>
/// <param name="amount2">Barycentric scalar <c>b3</c> which represents a weighting factor towards third vector of 2d-triangle.</param>
/// <param name="result">The cartesian translation of barycentric coordinates as an output parameter.</param>
public static void Barycentric(
ref Vector2 value1,
ref Vector2 value2,
ref Vector2 value3,
float amount1,
float amount2,
out Vector2 result
)
{
result.X = MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2);
result.Y = MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2);
}