Implemented Ln distance.