/// <summary> /// Calculates angle compatibility of the two edges /// </summary> /// /// <param name="ed1"> /// First edge to be used in calculation /// </param> /// /// <param name="ed2"> /// Second edge to be used in calculation /// </param> /// /// <returns> /// Angle compatibility coefficient ranging from 0 to 1 /// </returns> private float AngleCompatibility(EdgeGroupData ed1, EdgeGroupData ed2) { var a = VectorTools.Angle(ed1.v1, ed1.v2, ed2.v1, ed2.v2); return((float)Math.Abs(Math.Cos(a))); }