owlps/owlps-positioning/point.cc

44 lines
541 B
C++

#include "point.hh"
Point Point::operator=(const Point &p)
{
if (this == &p)
return *this;
x = p.x;
y = p.y;
z = p.z;
return *this;
}
bool Point::operator<(const Point &p) const
{
if (x < p.x)
return true ;
if (x > p.x)
return false ;
if (y < p.y)
return true ;
if (y > p.y)
return false ;
if (z < p.z)
return true ;
return false ;
}
ostream &operator<<(ostream &os, const Point &p)
{
os << "(" << p.x << ";" << p.y << ";" << p.z << ")";
return os;
}