Dist() public static method

Get the distance of two vectors
public static Dist ( Vector V1, Vector V2 ) : double
V1 Vector
V2 Vector
return double
コード例 #1
0
        public static VoronoiGraph FilterVG(VoronoiGraph VG, double minLeftRightDist)
        {
            VoronoiGraph VGErg = new VoronoiGraph();

            foreach (VoronoiEdge VE in VG.Edges)
            {
                if (Math.Sqrt(Vector.Dist(VE.LeftData, VE.RightData)) >= minLeftRightDist)
                {
                    VGErg.Edges.Add(VE);
                }
            }
            foreach (VoronoiEdge VE in VGErg.Edges)
            {
                VGErg.Vertizes.Add(VE.VVertexA);
                VGErg.Vertizes.Add(VE.VVertexB);
            }
            return(VGErg);
        }