1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 10:00:48 +02:00

Added equality operators for vector types

This commit is contained in:
Simon Rasmussen
2017-03-01 12:39:25 +01:00
parent d778559894
commit 71ebb4afbf

View File

@@ -2,11 +2,21 @@
#include <inttypes.h> #include <inttypes.h>
typedef struct { struct double3_t {
double x, y, z; double x, y, z;
} double3_t; };
typedef struct { struct cartesian_coord_t {
double3_t position; double3_t position;
double3_t rotation; double3_t rotation;
} cartesian_coord_t; };
inline bool operator==(const double3_t& lhs, const double3_t& rhs)
{
return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z;
}
inline bool operator==(const cartesian_coord_t& lhs, const cartesian_coord_t& rhs)
{
return lhs.position == rhs.position && lhs.rotation == rhs.rotation;
}