ivcurves.compare_curves._find_distance#
- ivcurves.compare_curves._find_distance(x, y, xp, yp)#
Calculates the distance between two points \((x, y)\) and \((x_p, y_p)\) using a scaled Euclidean distance.
The scaled Euclidean distance is defined as
\[\sqrt{\left(\frac{x_p - x}{x}\right)^2 + \left(\frac{y_p - y}{y}\right)^2}\]If \(x\) is zero, it is
\[\sqrt{\left(\frac{y_p - y}{y}\right)^2}\]If \(y\) is zero, it is
\[\sqrt{\left(\frac{x_p - x}{x}\right)^2}\]It is assumed that \((x, y) \neq 0\).