// Computation helper methods public static E replace(E x, E from, E to) { if (x is null) { throw new ArgumentNullException(nameof(x)); } if (from.Kind != Expressions.ExpressionKind.Variable) { throw new ArgumentException("The parameter " + nameof(from) + " expects an expression of kind variable."); } if (to is null) { throw new ArgumentNullException(nameof(to)); } return(x.SubstituteVariables(new Dictionary <string, E> { { from.GetName(), to } })); }
public static E tan(E x) => M.Tan(x);
// Trigonometric functions public static E sin(E x) => M.Sin(x);
public static E cos(E x) => M.Cos(x);
public static E root(E x, E y) => M.Root(x, y);
public static E pow(E x, E y) => M.Pow(x, y);
public static E ln(E x) => M.Ln(x);
public static E sqrt(E x) => M.Sqrt(x);
public static E exp(E x) => M.Exp(x);
// Mathematic functions public static E abs(E x) => M.Abs(x);
public static Vector4 vec(E x, E y, E z, E w) => new Vector4(x, y, z, w);
public static Vector3 vec(E x, E y, E z) => new Vector3(x, y, z);
// Helper methods for constructing vectors public static Vector2 vec(E x, E y) => new Vector2(x, y);