public double GetDerivative(double t) { if (Math.Abs(P) < Precision.DOUBLE_EPSILON) { return(_linearDegenerate.GetDerivative(t)); } var p = -MathHelper.Clamp(P, -1, 1) * 10; return(t < 0.5 ? Derivative(2 * t, p) : Derivative(2 - 2 * t, p)); }
public double GetDerivative(double t) { if (Math.Abs(P) < Precision.DOUBLE_EPSILON) { return(_linearDegenerate.GetDerivative(t)); } var p = -MathHelper.Clamp(P, -1, 1) * 10; return(p * Math.Log(2) * Math.Pow(2, p * t) / (Math.Pow(2, p) - 1)); }
public double GetDerivative(double t) { if (Math.Abs(P) < Precision.DOUBLE_EPSILON) { return(_linearDegenerate.GetDerivative(t)); } var p = MathHelper.Clamp(P, -1, 1) * 7; return(Math.Exp(p) / Math.Pow(t * (Math.Exp(p) - 1) + 1, 2)); }
public double GetDerivative(double t) { if (Math.Abs(P) < Precision.DOUBLE_EPSILON) { return(_linearDegenerate.GetDerivative(t)); } var p = MathHelper.Clamp(P, -1, 1); var b = 2 * Math.Acos(1 / (Math.Sqrt(2) * Math.Abs(p) - Math.Abs(p) + 1)); return(p < 0 ? Derivative(1 - t, b) : Derivative(t, b)); }