public static double SmoothStep(double value1, double value2, double amount) { // It is expected that 0 < amount < 1 // If amount < 0, return value1 // If amount > 1, return value2 double result = Utils.Clamp(amount, 0f, 1f); return Utils.Hermite(value1, 0f, value2, 0f, result); }
public static Vector4 SmoothStep(Vector4 value1, Vector4 value2, float amount) { return(new Vector4( Utils.SmoothStep(value1.X, value2.X, amount), Utils.SmoothStep(value1.Y, value2.Y, amount), Utils.SmoothStep(value1.Z, value2.Z, amount), Utils.SmoothStep(value1.W, value2.W, amount))); }