/// <summary> /// Generates the gene. /// </summary> /// <param name="geneIndex">Index of the gene.</param> /// <returns>The new Gene.</returns> public override double GenerateGene(int geneIndex) { if (geneIndex % 2 == 0) { return(FastRandom.GetFloat() * Width); } else { return(FastRandom.GetFloat() * Height); } }
/// <summary> /// Generates the gene. /// </summary> /// <param name="geneIndex">Index of the gene.</param> /// <returns>The new Gene.</returns> public override double GenerateGene(int geneIndex) { return(FastRandom.GetFloat() * maxGeneValue); }