periodic_distance now accepts Array<double> instead of double *