Microsoft.Xna.Framework.Vector2.SmoothStep C# (CSharp) Method

SmoothStep() public static method

Interpolates between two values using a cubic equation.
public static SmoothStep ( Vector2 &value1, Vector2 &value2, float amount, Vector2 &result ) : void
value1 Vector2 Source value.
value2 Vector2 Source value.
amount float Weighting value.
result Vector2 [OutAttribute] The interpolated value.
return void
        public static void SmoothStep(ref Vector2 value1, ref Vector2 value2, float amount, out Vector2 result)
        {
            amount = ((amount > 1f) ? 1f : ((amount < 0f) ? 0f : amount));
            amount = amount * amount * (3f - 2f * amount);
            result.X = value1.X + (value2.X - value1.X) * amount;
            result.Y = value1.Y + (value2.Y - value1.Y) * amount;
        }
        /// <summary>Performs a Catmull-Rom interpolation using the specified positions.</summary>

Same methods

Vector2::SmoothStep ( Vector2 value1, Vector2 value2, float amount ) : Vector2