コード例 #1
0
ファイル: Vector2D.cs プロジェクト: AlexMacocian/Cosmos
 /// <summary>
 /// Creates a new <see cref="Vector2D"/> that contains cubic interpolation of the specified vectors.
 /// </summary>
 /// <param name="value1">Source <see cref="Vector2D"/>.</param>
 /// <param name="value2">Source <see cref="Vector2D"/>.</param>
 /// <param name="amount">Weighting value.</param>
 /// <returns>Cubic interpolation of the specified vectors.</returns>
 public static Vector2D SmoothStep(Vector2D value1, Vector2D value2, double amount)
 {
     return(new Vector2D(
                MathHelperD.SmoothStep(value1.X, value2.X, amount),
                MathHelperD.SmoothStep(value1.Y, value2.Y, amount)
                ));
 }
コード例 #2
0
ファイル: Vector2D.cs プロジェクト: AlexMacocian/Cosmos
 /// <summary>
 /// Creates a new <see cref="Vector2D"/> that contains cubic interpolation of the specified vectors.
 /// </summary>
 /// <param name="value1">Source <see cref="Vector2D"/>.</param>
 /// <param name="value2">Source <see cref="Vector2D"/>.</param>
 /// <param name="amount">Weighting value.</param>
 /// <param name="result">Cubic interpolation of the specified vectors as an output parameter.</param>
 public static void SmoothStep(
     ref Vector2D value1,
     ref Vector2D value2,
     double amount,
     out Vector2D result
     )
 {
     result.X = MathHelperD.SmoothStep(value1.X, value2.X, amount);
     result.Y = MathHelperD.SmoothStep(value1.Y, value2.Y, amount);
 }