public static string ToDebugString(this S2LaxPolygonShape polygon, string loop_separator = ";\n") { var sb = new List <String>(); for (var i = 0; i < polygon.NumLoops; ++i) { var n = polygon.NumLoopVertices(i); if (n == 0) { sb.Add("full"); } else { sb.Add(AppendVertices(polygon.LoopVertices(i, 0, n), n)); } } return(String.Join(loop_separator, sb)); }