public static float CompareLengths_MAX(LineSegment segment0, LineSegment segment1) { float length0 = (segment0.p0 - segment0.p1).magnitude; float length1 = (segment1.p0 - segment1.p1).magnitude; if (length0 < length1) { return 1; } if (length0 > length1) { return -1; } return 0; }
public static float CompareLengths(LineSegment edge0, LineSegment edge1) { return - CompareLengths_MAX(edge0, edge1); }
/* * public List<LineSegment> DelaunayLinesForSite(Vector2f coord) { * return DelaunayLinesForEdges(Edge.SelectEdgesForSitePoint(coord, edges)); * }*/ public List <LineSegment> VoronoiDiagram() { return(LineSegment.VisibleLineSegments(edges)); }
public List <LineSegment> VoronoiBoundaryForSite(Vector2f coord) { return(LineSegment.VisibleLineSegments(Edge.SelectEdgesForSitePoint(coord, edges))); }
public static float CompareLengths(LineSegment edge0, LineSegment edge1) { return(-CompareLengths_MAX(edge0, edge1)); }