83    const std::vector<PtCase> cases{
 
   84        { { -100, 0 }, 
true },
 
   91        { { 50, -50 }, 
true },
 
   93        { { 200, 0 }, 
false },
 
   94        { { 100, 0 }, 
false },
 
   95        { { 100, 50 }, 
false },
 
   98    for( 
const PtCase& pc : cases )
 
  100        BOOST_TEST_INFO( 
"Point: " << pc.Point );
 
  102                    == ( pc.ExpectedStart ? seg.
A : seg.
B ) );
 
 
bool PointProjectsOntoSegment(const VECTOR2I &aPoint, const SEG &aSeg)
Determine if a point projects onto a segment.
 
double GetLengthRatioFromStart(const VECTOR2I &aPoint, const SEG &aSeg)
Get the ratio of the vector to a point from the segment's start, compared to the segment's length.
 
const VECTOR2I & GetNearestEndpoint(const SEG &aSeg, const VECTOR2I &aPoint)
Get the nearest end of a segment to a point.
 
bool PointIsInDirection(const VECTOR2< T > &aPoint, const VECTOR2< T > &aDirection, const VECTOR2< T > &aFrom)
 
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
 
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
 
BOOST_TEST(contains==c.ExpectedContains)
 
BOOST_AUTO_TEST_SUITE_END()
 
BOOST_AUTO_TEST_CASE(PointIsInDirection)
 
VECTOR2< int32_t > VECTOR2I
 
Supplemental functions for working with vectors and simple objects that interact with vectors.