-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSMath.cs
More file actions
26 lines (23 loc) · 1.27 KB
/
Copy pathSMath.cs
File metadata and controls
26 lines (23 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
namespace StringMath.Expressions;
public static class SMath
{
public static Variable Var(string name) => new(name);
public static Binary Binary(Expr left, string op, Expr right) => Factory.BinaryExpr(left, op, right);
public static Unary Unary(Expr left, string op) => Factory.UnaryExpr(op, left);
public static Neg Neg(Expr Value) => new(Value);
public static Factorial Factorial(Expr Value) => new(Value);
public static Sin Sin(Expr Value) => new(Value);
public static Cos Cos(Expr Value) => new(Value);
public static Abs Abs(Expr Value) => new(Value);
public static Sqrt Sqrt(Expr Value) => new(Value);
public static Tan Tan(Expr Value) => new(Value);
public static Atan Atan(Expr Value) => new(Value);
public static Exp Exp(Expr Value) => new(Value);
public static Sum Sum(Expr Left, Expr Right) => new(Left, Right);
public static Diff Diff(Expr Left, Expr Right) => new(Left, Right);
public static Mul Mul(Expr Left, Expr Right) => new(Left, Right);
public static Div Div(Expr Left, Expr Right) => new(Left, Right);
public static Pow Pow(Expr Left, Expr Right) => new(Left, Right);
public static Mod Mod(Expr Left, Expr Right) => new(Left, Right);
public static Log Log(Expr Left, Expr Right) => new(Left, Right);
}