Méthode | Description | |
---|---|---|
DistanceToPoint ( Point point ) : float |
Calculate Euclidean distance between a point and a line.
|
|
Equals ( object obj ) : bool |
Check if this instance of Line equals to the specified one.
|
|
FromPointTheta ( Point point, float theta ) : Line |
Constructs a Line from a point and an angle (in degrees). theta is the counterclockwise rotation from the positive X axis to the vector through the origin and normal to the line. This means that if theta is in [0,180), the point on the line closest to the origin is on the positive X or Y axes, or in quadrants I or II. Likewise, if theta is in [180,360), the point on the line closest to the origin is on the negative X or Y axes, or in quadrants III or IV. |
|
FromPoints ( Point point1, Point point2 ) : Line |
Creates a Line that goes through the two specified points.
|
|
FromRTheta ( float radius, float theta ) : Line |
Constructs a Line from a radius and an angle (in degrees). radius is the minimum distance from the origin to the line, and theta is the counterclockwise rotation from the positive X axis to the vector through the origin and normal to the line. This means that if theta is in [0,180), the point on the line closest to the origin is on the positive X or Y axes, or in quadrants I or II. Likewise, if theta is in [180,360), the point on the line closest to the origin is on the negative X or Y axes, or in quadrants III or IV. |
|
FromSlopeIntercept ( float slope, float intercept ) : Line |
Creates a Line with the specified slope and intercept. The construction here follows the same rules as for the rest of this class. Most lines are expressed as y = slope * x + intercept. Vertical lines, however, are x = intercept. This is indicated by IsVertical being true or by Slope returning float.PositiveInfinity or float.NegativeInfinity. |
|
GetAngleBetweenLines ( Line secondLine ) : float |
Calculate minimum angle between this line and the specified line measured in [0, 90] degrees range.
|
|
GetHashCode ( ) : int |
Get hash code for this instance.
|
|
GetIntersectionWith ( Line secondLine ) : Point? |
Finds intersection point with the specified line.
|
|
GetIntersectionWith ( |
Finds, provided it exists, the intersection point with the specified LineSegment. If the line and segment do not intersect, the method returns |
|
ToString ( ) : string |
Get string representation of the class.
|
|
operator ( ) : bool |
Equality operator - checks if two lines have equal parameters.
|
Méthode | Description | |
---|---|---|
Line ( Point start, Point end ) : System | ||
Line ( Point point, float theta ) : System | ||
Line ( float slope, float intercept ) : System | ||
Line ( float radius, float theta, bool unused ) : System |
public DistanceToPoint ( Point point ) : float | ||
point | Point | The point to calculate distance to. |
Résultat | float |
public Equals ( object obj ) : bool | ||
obj | object | Another line to check equalty to. |
Résultat | bool |
public static FromPointTheta ( Point point, float theta ) : Line | ||
point | Point | The minimum distance from the line to the origin. |
theta | float | The angle of the normal vector from the origin to the line. |
Résultat | Line |
public static FromPoints ( Point point1, Point point2 ) : Line | ||
point1 | Point | One point on the line. |
point2 | Point | Another point on the line. |
Résultat | Line |
public static FromRTheta ( float radius, float theta ) : Line | ||
radius | float | The minimum distance from the line to the origin. |
theta | float | The angle of the vector from the origin to the line. |
Résultat | Line |
public static FromSlopeIntercept ( float slope, float intercept ) : Line | ||
slope | float | The slope of the line |
intercept | float | The Y-intercept of the line, unless the slope is an /// infinity, in which case the line's equation is "x = intercept" instead. |
Résultat | Line |
public GetAngleBetweenLines ( Line secondLine ) : float | ||
secondLine | Line | The line to find angle between. |
Résultat | float |
public GetIntersectionWith ( Line secondLine ) : Point? | ||
secondLine | Line | Line to find intersection with. |
Résultat | Point? |
public GetIntersectionWith ( |
||
other | ||
Résultat | Point? |