Struct LineSegment2DF
A line segment
public struct LineSegment2DF
- Inherited Members
Constructors
LineSegment2DF(PointF, PointF)
Create a line segment with the specific start point and end point
public LineSegment2DF(PointF p1, PointF p2)
Parameters
Properties
Direction
The direction of the line, the norm of which is 1
public PointF Direction { get; }
Property Value
Length
Get the length of the line segment
public double Length { get; }
Property Value
P1
A point on the line
public PointF P1 { get; set; }
Property Value
P2
An other point on the line
public PointF P2 { get; set; }
Property Value
Methods
GetExteriorAngleDegree(LineSegment2DF)
Get the exterior angle between this line and otherLine
public double GetExteriorAngleDegree(LineSegment2DF otherLine)
Parameters
otherLine
LineSegment2DFThe other line
Returns
- double
The exterior angle between this line and
otherLine
Side(PointF)
Determin which side of the line the 2D point is at
public int Side(PointF point)
Parameters
point
PointFthe point
Returns
- int
1 if on the right hand side; 0 if on the line; -1 if on the left hand side;
YByX(float)
Obtain the Y value from the X value using first degree interpolation
public float YByX(float x)
Parameters
x
floatThe X value
Returns
- float
The Y value