Segment class

line between two points.

Example:

// Create segments
Segment segment1 = Segment(start1, end1);
Segment segment2 = Segment(start2, end2);
print("Created segments: S1((${segment1.start.x}, ${segment1.start.y}) -> (${segment1.end.x}, ${segment1.end.y})), S2((${segment2.start.x}, ${segment2.start.y}) -> (${segment2.end.x}, ${segment2.end.y}))");

Constructors

Segment(Point start, Point end)
Default constructor.

Properties

end Point
End point of the segment.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start Point
Start point of the segment.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited