]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/blobdiff - src/bcar.cc
Add operator== for pose
[hubacji1/bcar.git] / src / bcar.cc
index 0cdb078b43d14461c397fd8aefcb0752eabc14b4..93f017e7cacde2038ae0cf57e3092c163c659473 100644 (file)
@@ -124,6 +124,12 @@ Point::edist(Point const& p) const
        return sqrt(pow(p.x() - this->x_, 2.0) + pow(p.y() - this->y_, 2.0));
 }
 
+bool
+Point::operator==(Point const& p)
+{
+       return this->x() == p.x() && this->y() == p.y();
+}
+
 std::ostream&
 operator<<(std::ostream& out, Point const& p)
 {
@@ -290,6 +296,12 @@ Pose::reflect(Line const& li)
        this->h(this->h() + 2.0 * dh);
 }
 
+bool
+Pose::operator==(Pose const& p)
+{
+       return this->x() == p.x() && this->y() == p.y() && this->h() == p.h();
+}
+
 std::ostream&
 operator<<(std::ostream& out, Pose const& p)
 {