Skip to content

Commit

Permalink
libdeng2|Vector: Added inequality operators for 2D/3D/4D integer Vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Feb 25, 2013
1 parent 11e807c commit 3547f4b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions doomsday/libdeng2/include/de/vector.h
Expand Up @@ -464,6 +464,37 @@ inline bool operator == (Vector4<duint> const &a, Vector4<duint> const &b)
return a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w;
}

// Inequality operators for integer types.
inline bool operator != (Vector2<dint> const &a, Vector2<dint> const &b)
{
return !(a == b);
}

inline bool operator != (Vector3<dint> const &a, Vector3<dint> const &b)
{
return !(a == b);
}

inline bool operator != (Vector4<dint> const &a, Vector4<dint> const &b)
{
return !(a == b);
}

inline bool operator != (Vector2<duint> const &a, Vector2<duint> const &b)
{
return !(a == b);
}

inline bool operator != (Vector3<duint> const &a, Vector3<duint> const &b)
{
return !(a == b);
}

inline bool operator != (Vector4<duint> const &a, Vector4<duint> const &b)
{
return !(a == b);
}

//@{
/// @ingroup types
typedef Vector2<dint> Vector2i; ///< 2-component vector of integer values.
Expand Down

0 comments on commit 3547f4b

Please sign in to comment.