Line2D Type
A struct containing 4 floats, representing an immutable finite line in 2D.
Record fields
| Record Field |
Description
|
Full Usage:
FromX
Field type: float
|
The field holding the X coordinate of the start point of the line.
|
Full Usage:
FromY
Field type: float
|
The field holding the Y coordinate of the start point of the line.
|
Full Usage:
ToX
Field type: float
|
The field holding the X coordinate of the end point of the line.
|
Full Usage:
ToY
Field type: float
|
The field holding 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 a 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.AsFSharpCode
Returns: string
|
Format 2D line into an F# code string that can be used to recreate the line.
|
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 ln.ToString()
|
|
Same as ln.Vector or ln.Tangent. The returned vector has the same length as the Line2D.
|
The start point of the 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 squared 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 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.
|
Full Usage:
this.VectorX
Returns: float
Modifiers: inline |
The X component of the line Direction/Vector.
|
Full Usage:
this.VectorY
Returns: float
Modifiers: inline |
The Y component of the line Direction/Vector.
|
Euclid