Create euclidean function.