DNA: Add C++ comparison operator to rcti
This commit is contained in:
committed by
Sergey Sharybin
parent
1c6c05ea7e
commit
032bcd50f8
@@ -63,6 +63,17 @@ typedef struct vec4d {
|
||||
typedef struct rcti {
|
||||
int xmin, xmax;
|
||||
int ymin, ymax;
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline bool operator==(const rcti &other) const
|
||||
{
|
||||
return xmin == other.xmin && xmax == other.xmax && ymin == other.ymin && ymax == other.ymax;
|
||||
}
|
||||
inline bool operator!=(const rcti &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
#endif
|
||||
} rcti;
|
||||
|
||||
/** float rectangle. */
|
||||
|
||||
Reference in New Issue
Block a user