Class Segment

A segment class that is defined by two

class Segment(T, uint dimensions) ;

Constructors

NameDescription
this Constructor for a segment; Takes in the initial point and the terminal point

Fields

NameTypeDescription
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

NameTypeDescription
direction[get] Vector!(T,dimensions)Returns the direction of the segment from initial to terminal

Methods

NameDescription
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