Add geom::box comparison operators
This commit is contained in:
parent
d577282fce
commit
29bdfb4dd2
1 changed files with 15 additions and 0 deletions
|
|
@ -241,6 +241,21 @@ namespace psemek::geom
|
||||||
return *this = *this | b;
|
return *this = *this | b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, std::size_t N>
|
||||||
|
bool operator == (box<T, N> const & b1, box<T, N> const & b2)
|
||||||
|
{
|
||||||
|
for (std::size_t i = 0; i < N; ++i)
|
||||||
|
if (b1[i] != b2[i])
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, std::size_t N>
|
||||||
|
bool operator != (box<T, N> const & b1, box<T, N> const & b2)
|
||||||
|
{
|
||||||
|
return !(b1 == b2);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
std::ostream & operator << (std::ostream & os, box<T, N> const & b)
|
std::ostream & operator << (std::ostream & os, box<T, N> const & b)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue