What is the distance between Chebyshev and snow? Suppose there are two points, a (x, y), B (m,n) then the Chebyshev distance between these two points is Max (|x-m|,|y-n|)
But does it have any eggs? I don't know, either.
However, it can be converted into a Manhattan distance, which is very 6. With a very magical thought.
We rotate the coordinate system clockwise 45 °, the distance from the point to the origin is fixed, then we use the and angular formula, the coordinates of this point is (sin45°* (x-y), sin45°* (X+y)). Then we take the sqrt (2); Then the Chebyshev distance between the two points is the Manhattan distance in this case divided by 2. (There's a very troublesome sort of discussion in the middle ...) I will not write, the full version can be seen here: http://blog.csdn.net/dgq8211/article/details/7796711
Then we can mess it up!
Chebyshev Snow Distance