Beispiel #1
0
        public double[] SolveAlgorithm(double[] inputs)
        {
            float x = 0, y = 0, z = 0;

            if (inputs.Length == 1)
            {
                x = (float)inputs[0];
            }
            else if (inputs.Length == 2)
            {
                x = (float)inputs[0];
                y = (float)inputs[1];
            }
            else if (inputs.Length >= 3)
            {
                x = (float)inputs[0];
                y = (float)inputs[1];
                z = (float)inputs[2];
            }

            float result = noise.GetValue(x, y, z);

            return(new double[] { (double)result });
        }
Beispiel #2
0
 public double[] SolveNoise(double[] inputs)
 {
     return(new double[] { noise.GetValue((float)inputs[0], (float)inputs[1], (float)inputs[2]) });
 }