Add KiROUND for VECTOR2 types.

This commit is contained in:
Alex Shvartzkop 2023-12-02 17:04:19 +03:00
parent 98091d0199
commit bfcd087751
1 changed files with 6 additions and 0 deletions

View File

@ -587,6 +587,12 @@ std::ostream& operator<<( std::ostream& aStream, const VECTOR2<T>& aVector )
typedef VECTOR2<double> VECTOR2D;
typedef VECTOR2<int> VECTOR2I;
/* KiROUND specialization for vectors */
inline VECTOR2I KiROUND( const VECTOR2D& vec )
{
return VECTOR2I( KiROUND( vec.x ), KiROUND( vec.y ) );
}
/* STL specializations */
namespace std
{