Skip to content

Commit

Permalink
libcore|Vector: Vector typedefs
Browse files Browse the repository at this point in the history
In the future, Vector templates have shorter names. These typedefs will make it easier to merge code.
  • Loading branch information
skyjake committed Dec 29, 2019
1 parent 4685cca commit 04326f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doomsday/sdk/libcore/include/de/core/vector.h
Expand Up @@ -818,6 +818,16 @@ typedef Vector4<dfloat> Vector4f; ///< 4-component vector of floating point va
typedef Vector4<ddouble> Vector4d; ///< 4-component vector of high-precision floating point values.
///@}

using Vec2i = Vector2i;
using Vec3i = Vector3i;
using Vec4i = Vector4i;
using Vec2f = Vector2f;
using Vec3f = Vector3f;
using Vec4f = Vector4f;
using Vec2d = Vector2d;
using Vec3d = Vector3d;
using Vec4d = Vector4d;

// Qt hash functions:
inline quint32 qHash(Vector2i const &vec) { return vec.x * vec.y + vec.x - vec.y; }

Expand Down

0 comments on commit 04326f8

Please sign in to comment.