Line2D Type
An immutable finite line in 2D. Represented by a 2D start and 2D end point.
Record fields
Record Field |
Description
|
Full Usage:
FromX
Field type: float
|
Returns the X coordinate of the start point of the line.
|
Full Usage:
FromY
Field type: float
|
Returns the Y coordinate of the start point of the line.
|
Full Usage:
ToX
Field type: float
|
Returns the X coordinate of the end point of the line.
|
Full Usage:
ToY
Field type: float
|
Returns the Y coordinate of the end point of the line.
|
Constructors
Constructor |
Description
|
Full Usage:
Line2D(fromX, fromY, toX, toY)
Parameters:
float
fromY : float
toX : float
toY : float
Returns: Line2D
|
Create Line2D from 2D start point's x and y and 2D end point's x and y .
|
|
Instance members
Instance member |
Description
|
Full Usage:
this.AsString
Returns: string
|
Format 2D line into string from X and Y for start and end points. Using nice floating point number formatting . But without full type name as in v.ToString()
|
|
Same as ln.Vector or ln.Tangent. The returned vector has the same length as the Line2D.
|
The Start point of the 2D Line2D,
|
|
Full Usage:
this.Length
Returns: float
Modifiers: inline |
Returns the length of the line.
|
Full Usage:
this.LengthSq
Returns: float
Modifiers: inline |
Returns the square length of the line.
|
|
Same as ln.Vector or ln.Direction. The returned vector has the same length as the Line2D.
|
The End point of the 2D Line2D,
|
|
|
Returns a unit-vector of the line Direction.
|
|
Same as ln.Tangent or ln.Direction. The returned vector has the same length as the Line2D.
|