SEG: added Center() method

This commit is contained in:
Maciej Suminski 2018-03-28 15:49:02 +02:00
parent 99e79c077a
commit 168112cf84
1 changed files with 6 additions and 0 deletions

View File

@ -321,6 +321,12 @@ public:
std::swap( A, B );
}
///> Returns the center point of the line
VECTOR2I Center() const
{
return A + ( B - A ) / 2;
}
private:
bool ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I &aC ) const;