Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
JuliaVariation.cs
1using System;
4
6{
11 {
12 private readonly double omega;
13
18 : base(Parameter, Start, Length, Expression)
19 {
20 this.omega = 0;
21 }
22
23 private JuliaVariation(double Omega, ScriptNode Parameter, int Start, int Length, Expression Expression)
24 : base(Parameter, Start, Length, Expression)
25 {
26 this.omega = Omega;
27 }
28
33 {
34 return new JuliaVariation(Expression.ToDouble(Argument.AssociatedObjectValue), this.Argument, this.Start, this.Length, this.Expression);
35 }
36
40 public override void Operate(ref double x, ref double y)
41 {
42 double r = Math.Pow(x * x + y * y, 0.25);
43 double a = Math.Atan2(x, y) / 2;
44 x = Math.Cos(a + this.omega) * r;
45 y = Math.Sin(a + this.omega) * r;
46 }
47
51 public override string FunctionName => nameof(JuliaVariation);
52 }
53}
Class managing a script expression.
Definition: Expression.cs:39
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:4824
override IElement Evaluate(IElement Argument, Variables Variables)
TODO
override void Operate(ref double x, ref double y)
TODO
JuliaVariation(ScriptNode Parameter, int Start, int Length, Expression Expression)
TODO
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20