GetIntersectionWith() public method

Finds, provided it exists, the intersection point with the specified Line.

If the line and the segment do not intersect, the method returns . If the line and the segment share multiple points, the method throws an InvalidOperationException.

Thrown if this segment is a portion of /// line.
public GetIntersectionWith ( Line other ) : DoublePoint?
other Line to find intersection with.
return DoublePoint?
Beispiel #1
0
 /// <summary>
 /// Finds, provided it exists, the intersection point with the specified <see cref="LineSegment"/>.
 /// </summary>
 ///
 /// <param name="other"><see cref="LineSegment"/> to find intersection with.</param>
 ///
 /// <returns>Returns intersection point with the specified <see cref="LineSegment"/>, or <see langword="null"/>,
 /// if this line does not intersect with the segment.</returns>
 ///
 /// <remarks><para>If the line and segment do not intersect, the method returns <see langword="null"/>.
 /// If the line and segment share multiple points, the method throws an <see cref="InvalidOperationException"/>.
 /// </para></remarks>
 ///
 /// <exception cref="InvalidOperationException">Thrown if <paramref name="other"/> is a portion
 /// of this line.</exception>
 ///
 public Point?GetIntersectionWith(LineSegment other)
 {
     return(other.GetIntersectionWith(this));
 }
Beispiel #2
0
 /// <summary>
 /// Finds, provided it exists, the intersection point with the specified <see cref="LineSegment"/>.
 /// </summary>
 /// 
 /// <param name="other"><see cref="LineSegment"/> to find intersection with.</param>
 /// 
 /// <returns>Returns intersection point with the specified <see cref="LineSegment"/>, or <see langword="null"/>,
 /// if this line does not intersect with the segment.</returns>
 /// 
 /// <remarks><para>If the line and segment do not intersect, the method returns <see langword="null"/>.
 /// If the line and segment share multiple points, the method throws an <see cref="InvalidOperationException"/>.
 /// </para></remarks>
 /// 
 /// <exception cref="InvalidOperationException">Thrown if <paramref name="other"/> is a portion
 /// of this line.</exception>
 /// 
 public Point? GetIntersectionWith( LineSegment other )
 {
     return other.GetIntersectionWith( this );
 }