Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
TwintrianVariation.cs
1using System;
2
4{
9 {
14 : base(Start, Length, Expression)
15 {
16 }
17
21 public override void Operate(ref double x, ref double y)
22 {
23 double r1;
24
25 lock (this.gen)
26 {
27 r1 = this.gen.NextDouble();
28 }
29
30 r1 *= Math.Sqrt(x * x + y * y) * this.variationWeight;
31
32 double s = Math.Sin(r1);
33 double c = Math.Cos(r1);
34 double t = Math.Log10(s * s) + c;
35
36 y = x * (t - Math.PI * s);
37 x *= t;
38 }
39
40 private readonly Random gen = new Random();
41
45 public override string FunctionName => nameof(TwintrianVariation);
46 }
47}
Class managing a script expression.
Definition: Expression.cs:39
TwintrianVariation(int Start, int Length, Expression Expression)
TODO
override void Operate(ref double x, ref double y)
TODO
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92