Skip to content

Commit

Permalink
libdeng2|Vector: Added method for converting to Vector4f
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jan 26, 2014
1 parent 9896f27 commit 72383c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/libdeng2/include/de/core/vector.h
Expand Up @@ -484,6 +484,9 @@ class Vector4 : public Vector3<Type>
Vector4<dbyte> toVector4ub() const {
return Vector4<dbyte>(dbyte(Vector3<Type>::x), dbyte(Vector3<Type>::y), dbyte(Vector3<Type>::z), dbyte(w));
}
Vector4<dfloat> toVector4f() const {
return Vector4<dfloat>(dfloat(Vector3<Type>::x), dfloat(Vector3<Type>::y), dfloat(Vector3<Type>::z), dfloat(w));
}
Type &operator [] (int index) {
DENG2_ASSERT(index >= 0 && index <= 3);
Type *ptrs[] = { &(this->Vector2<Type>::x),
Expand Down

0 comments on commit 72383c1

Please sign in to comment.