private void DrawRoundCap(VertexHelper vh, Serie serie, Vector3 centerPos, Color color, float insideRadius, float outsideRadius, ref float drawStartDegree, ref float drawEndDegree) { if (serie.roundCap && insideRadius > 0 && drawStartDegree != drawEndDegree) { var width = (outsideRadius - insideRadius) / 2; var radius = insideRadius + width; var diffDegree = Mathf.Asin(width / radius) * Mathf.Rad2Deg; drawStartDegree += serie.clockwise ? diffDegree : -diffDegree; drawEndDegree -= serie.clockwise ? diffDegree : -diffDegree; UGL.DrawRoundCap(vh, centerPos, width, radius, drawStartDegree, serie.clockwise, color, false); UGL.DrawRoundCap(vh, centerPos, width, radius, drawEndDegree, serie.clockwise, color, true); } }