I don't really like this: μ here is not really the mean in the usual sense, but is the circular mean. Perhaps we should use a different function for this.