12 private readonly
double power;
13 private readonly
double sides;
14 private readonly
double corners;
15 private readonly
double circle;
22 : base(new
ScriptNode[] { high, low, corners, circle },
35 public NGonVariation(
double High,
double Low,
double Corners,
double Circle,
38 : base(new
ScriptNode[] { high, low, corners, circle },
44 this.corners = Corners;
55 return new string[] {
"high",
"low",
"corners",
"circle" };
69 return new NGonVariation(High, Low, Corners, Circle, this.Arguments[0],
70 this.Arguments[1], this.Arguments[2], this.Arguments[3], this.
Start, this.Length,
77 public override void Operate(ref
double x, ref
double y)
79 double p2 = Math.PI * 2 / this.sides;
80 double a = Math.Atan2(y, x);
81 double t3 = a - p2 * Math.Floor(a / p2);
86 double r = Math.Sqrt(x * x + y * y);
87 double k = (this.corners * (1 / (Math.Cos(t3) + 1e-6) - 1) + this.circle) / Math.Pow(r,
this.power);
Class managing a script expression.
static double ToDouble(object Object)
Converts an object to a double value.
override void Operate(ref double x, ref double y)
TODO
override string FunctionName
TODO
override IElement Evaluate(IElement[] Arguments, Variables Variables)
TODO
override string[] DefaultArgumentNames
TODO
NGonVariation(double High, double Low, double Corners, double Circle, ScriptNode high, ScriptNode low, ScriptNode corners, ScriptNode circle, int Start, int Length, Expression Expression)
TODO
NGonVariation(ScriptNode high, ScriptNode low, ScriptNode corners, ScriptNode circle, int Start, int Length, Expression Expression)
TODO
object AssociatedObjectValue
TODO
ScriptNode[] Arguments
Function arguments.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Basic interface for all types of elements.
ArgumentType
Type of parameter used in a function definition or a lambda definition.