Accord.Imaging.Filters.Blend.distance C# (CSharp) Method

distance() private static method

Computes a distance metric used to compute the blending mask
private static distance ( float x1, float y1, float x2, float y2 ) : float
x1 float
y1 float
x2 float
y2 float
return float
        private static float distance(float x1, float y1, float x2, float y2)
        {
            // Euclidean distance
            float u = (x1 - x2);
            float v = (y1 - y2);
            return (float)Math.Sqrt(u * u + v * v);
        }
    }