FromPoints() public static method

Creates a Line that goes through the two specified points.
Thrown if the two points are the same.
public static FromPoints ( Point point1, Point point2 ) : Line
point1 Point One point on the line.
point2 Point Another point on the line.
return Line
コード例 #1
0
        public static float GetAngleBetweenLines(Point a1, Point a2, Point b1, Point b2)
        {
            Line line = Line.FromPoints(a1, a2);

            return(line.GetAngleBetweenLines(Line.FromPoints(b1, b2)));
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LineSegment"/> class.
 /// </summary>
 ///
 /// <param name="start">Segment's start point.</param>
 /// <param name="end">Segment's end point.</param>
 ///
 /// <exception cref="ArgumentException">Thrown if the two points are the same.</exception>
 ///
 public LineSegment(Point start, Point end)
 {
     line       = Line.FromPoints(start, end);
     this.start = start;
     this.end   = end;
 }