Class Segment
A segment class that is defined by two
class Segment(T, uint dimensions)
;
Constructors
Name | Description |
this
|
Constructor for a segment;
Takes in the initial point and the terminal point
|
Fields
Name | Type | Description |
initial
|
Vector!(T,dimensions) | The initial point (the vector points to the initial point)
|
terminal
|
Vector!(T,dimensions) | The terminal point (the vector points to the terminal point)
|
Properties
Name | Type | Description |
direction [get]
|
Vector!(T,dimensions) | Returns the direction of the segment from initial to terminal
|
Methods
Name | Description |
contains
|
Returns whether this segment contains the other point
Checks that a segment from origin to point has magnitude between initial and terminal's magnitude
Also checks that when point magnitude is 1 and direction magnitude is 1, they have the same or they have negated components
|