code: public CrossoverResult crossover() {
          double[][] parents = parentSelection.selectParents();
  
          boolean isModified = false;
          double[] resultGenes = parents[0];
  
          if (rng.nextDouble() < crossoverRate) {
              int chromosomeLength = parents[0].length;
  
              // Crossover
              resultGenes = new double[chromosomeLength];
  
              int crossoverPoint = rng.nextInt(chromosomeLength);
              for (int i = 0; i < resultGenes.length; ++i) {
                  resultGenes[i] = ((i < crossoverPoint) ? parents[0] : parents[1])[i];
              }
              isModified = true;
          }
  
          return new CrossoverResult(isModified, resultGenes);
      }
docs: Has a probability <i>crossoverRate</i> of performing the crossover where the operator will select a random crossover point.<br>
  Each gene before this point comes from one of the two parents and each gene at or after this point comes from the other parent.
  Otherwise, returns the genes of a random parent.
  
  @return The crossover result. See {@link CrossoverResult}.