Add zero and one constants to tvec2, tvec3 and tvec4.

This commit is contained in:
Dave Reid 2012-12-22 14:42:33 +10:00
parent 6ec248b75a
commit 88e13a1e16
6 changed files with 18 additions and 0 deletions

View File

@ -224,6 +224,9 @@ namespace detail
//////////////////////////////////////
// Static constants
static const tvec2<T> zero;
static const tvec2<T> one;
static const tvec2<T> xpos;
static const tvec2<T> xneg;
static const tvec2<T> ypos;

View File

@ -1029,6 +1029,9 @@ namespace detail
//////////////////////////////////////
// Static constants
template <typename T> const tvec2<T> tvec2<T>::zero = tvec2<T>(T( 0), T( 0));
template <typename T> const tvec2<T> tvec2<T>::one = tvec2<T>(T( 1), T( 1));
template <typename T> const tvec2<T> tvec2<T>::xpos = tvec2<T>(T( 1), T( 0));
template <typename T> const tvec2<T> tvec2<T>::xneg = tvec2<T>(T(-1), T( 0));
template <typename T> const tvec2<T> tvec2<T>::ypos = tvec2<T>(T( 0), T( 1));

View File

@ -249,6 +249,9 @@ namespace detail
//////////////////////////////////////
// Static constants
static const tvec3<T> zero;
static const tvec3<T> one;
static const tvec3<T> xpos;
static const tvec3<T> xneg;
static const tvec3<T> ypos;

View File

@ -1153,6 +1153,9 @@ namespace detail
//////////////////////////////////////
// Static constants
template <typename T> const tvec3<T> tvec3<T>::zero = tvec3<T>(T( 0), T( 0), T( 0));
template <typename T> const tvec3<T> tvec3<T>::one = tvec3<T>(T( 1), T( 1), T( 1));
template <typename T> const tvec3<T> tvec3<T>::xpos = tvec3<T>(T( 1), T( 0), T( 0));
template <typename T> const tvec3<T> tvec3<T>::xneg = tvec3<T>(T(-1), T( 0), T( 0));
template <typename T> const tvec3<T> tvec3<T>::ypos = tvec3<T>(T( 0), T( 1), T( 0));

View File

@ -305,6 +305,9 @@ namespace detail
//////////////////////////////////////
// Static constants
static const tvec4<T> zero;
static const tvec4<T> one;
static const tvec4<T> xpos;
static const tvec4<T> xneg;
static const tvec4<T> ypos;

View File

@ -1379,6 +1379,9 @@ namespace detail
//////////////////////////////////////
// Static constants
template <typename T> const tvec4<T> tvec4<T>::zero = tvec4<T>(T( 0), T( 0), T( 0), T( 0));
template <typename T> const tvec4<T> tvec4<T>::one = tvec4<T>(T( 1), T( 1), T( 1), T( 1));
template <typename T> const tvec4<T> tvec4<T>::xpos = tvec4<T>(T( 1), T( 0), T( 0), T( 0));
template <typename T> const tvec4<T> tvec4<T>::xneg = tvec4<T>(T(-1), T( 0), T( 0), T( 0));
template <typename T> const tvec4<T> tvec4<T>::ypos = tvec4<T>(T( 0), T( 1), T( 0), T( 0));