Notes on Euclidean distance