added one more template parameter (dimension for second point);
used to make sure that less is not called for points of different dimensions;