How to Compute Minkowski, Euclidean and CityBlock Distance in C++?

Given a number of coordinates (could be any dimensions, but for simplicity we use 2 dimension X/Y coordinates for demonstration), you can get the ‘central’ point by averaging all …