60 return ( aPoint - aFrom ).Dot( aDirection ) > 0;
Define a general 2D-vector/point.
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.
bool SegIsInDirection(const SEG &aSeg, const VECTOR2I &aDirection)
Determine if a segment's vector is within 90 degrees of a given direction.
bool PointsAreInSameDirection(const VECTOR2< T > &aPointA, const VECTOR2< T > &aPointB, const VECTOR2< T > &aFrom)
Check that the two given points are in the same direction from some other point.
VECTOR2I RoundNW(const VECTOR2I &aVec, int aGridSize)
Round a vector to the nearest grid point in the NW direction.
VECTOR2I RoundSE(const VECTOR2I &aVec, int aGridSize)
Round a vector to the nearest grid point in the SE direction.
const VECTOR2I & GetNearestEndpoint(const SEG &aSeg, const VECTOR2I &aPoint)
Get the nearest end of a segment to a point.
double GetProjectedPointLengthRatio(const VECTOR2I &aPoint, const SEG &aSeg)
Get the ratio of the vector to a point projected onto a segment from the start, relative to the segme...
VECTOR2I RoundGrid(const VECTOR2I &aVec, int aGridSize)
Round a vector to the nearest grid point in any direction.
bool PointIsInDirection(const VECTOR2< T > &aPoint, const VECTOR2< T > &aDirection, const VECTOR2< T > &aFrom)