Exemplo n.º 1
0
        public IEnumerable <KtSegment2D> CutBy(KtSegment2D other)
        {
            var intersection = IntersectionWith(other);

            if (intersection is null || intersection == Start || intersection == End)
            {
                return new[] { this }
            }
            ;
            return(new[] { new KtSegment2D(Start, intersection), new KtSegment2D(intersection, End) });
        }
Exemplo n.º 2
0
 public bool Equals(KtSegment2D other) => this.TestNullBeforeEquals(other, () => Start == other.Start && End == other.End);
Exemplo n.º 3
0
 internal static List <KtPoint2D> PointsToList(this KtSegment2D segment) => new()
Exemplo n.º 4
0
 private static IEnumerableSegments AggregateInternalMethod(IEnumerableSegments results, KtSegment2D segment) =>
 results.Select(result => result.CutBy(segment)).SelectMany(cuts => cuts);