%mathpiper,def="IsSegment"

IsSegment(list_IsList) <--
[
    If(IsList(list[1]) And Length(list[1])=2 And IsList(list[2]) And Length(list[2])=2,True,False);

];

%/mathpiper



%mathpiper_docs,name="IsSegment",categories="User Functions;Analytic Geometry",access="experimental"
*CMD IsSegment --- test for a segment
*STD
*CALL
	IsSegment(s)
*PARMS

{s} -- segment to test


*DESC

Tests if a value is a segment.

*E.G.

In> IsSegment(Segment(Point(0,0), Point(3,4)))
Result: True
	
In> IsSegment({3,4})
Result: False
	
*SEE Point, Midpoint, Distance, Slope, Segment
%/mathpiper_docs
