Function for one-point crossover.