Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
GaussianVariation.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, r2, r3, r4, r5;
24
25 lock (this.gen)
26 {
27 r1 = this.gen.NextDouble();
28 r2 = this.gen.NextDouble();
29 r3 = this.gen.NextDouble();
30 r4 = this.gen.NextDouble();
31 r5 = this.gen.NextDouble();
32 }
33
34 r1 += r2 + r3 + r4 - 2;
35
36 r5 *= Math.PI * 2;
37 x = r1 * Math.Cos(r5);
38 y = r1 * Math.Sin(r5);
39 }
40
41 private readonly Random gen = new Random();
42
46 public override string FunctionName => nameof(GaussianVariation);
47 }
48}
Class managing a script expression.
Definition: Expression.cs:39
override void Operate(ref double x, ref double y)
TODO
GaussianVariation(int Start, int Length, Expression Expression)
TODO
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92