Not quite sure what the difference is here...
This commit is contained in:
parent
195a7a17a8
commit
7e8af71e52
@ -52,8 +52,8 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size,typename StorageType, typename OperationType>
|
||||
Vector<Size,StorageType,OperationType>::Vector(StorageType x, StorageType y)
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size == 2, "This constructor should only be used for vectors with two elements.");
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size == 2, "This constructor should only be used for vectors with two elements.");
|
||||
|
||||
m_tElements[0] = x;
|
||||
m_tElements[1] = y;
|
||||
@ -67,8 +67,8 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size,typename StorageType, typename OperationType>
|
||||
Vector<Size,StorageType,OperationType>::Vector(StorageType x, StorageType y, StorageType z)
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size == 3, "This constructor should only be used for vectors with three elements.");
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size == 3, "This constructor should only be used for vectors with three elements.");
|
||||
|
||||
m_tElements[0] = x;
|
||||
m_tElements[1] = y;
|
||||
@ -85,8 +85,8 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size,typename StorageType, typename OperationType>
|
||||
Vector<Size,StorageType,OperationType>::Vector(StorageType x, StorageType y, StorageType z, StorageType w)
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size == 4, "This constructor should only be used for vectors with four elements.");
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size == 4, "This constructor should only be used for vectors with four elements.");
|
||||
|
||||
m_tElements[0] = x;
|
||||
m_tElements[1] = y;
|
||||
@ -135,8 +135,8 @@ namespace PolyVox
|
||||
// Force a vector to have a length greater than one. There is no need for a
|
||||
// vector with one element, and supporting this would cause confusion over the
|
||||
// behaviour of the constructor taking a single value, as this fills all elements
|
||||
// to that value rather than just the first one.
|
||||
POLYVOX_STATIC_ASSERT(Size > 1, "Vector must have a length greater than one.");
|
||||
// to that value rather than just the first one.
|
||||
POLYVOX_STATIC_ASSERT(Size > 1, "Vector must have a length greater than one.");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -441,8 +441,8 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size, typename StorageType, typename OperationType>
|
||||
inline StorageType Vector<Size, StorageType, OperationType>::getZ(void) const
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 3, "You can only get the 'z' component from a vector with at least three elements.");
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 3, "You can only get the 'z' component from a vector with at least three elements.");
|
||||
|
||||
return m_tElements[2];
|
||||
}
|
||||
@ -452,8 +452,8 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size, typename StorageType, typename OperationType>
|
||||
inline StorageType Vector<Size, StorageType, OperationType>::getW(void) const
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 4, "You can only get the 'w' component from a vector with at least four elements.");
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 4, "You can only get the 'w' component from a vector with at least four elements.");
|
||||
|
||||
return m_tElements[3];
|
||||
}
|
||||
@ -490,9 +490,9 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size,typename StorageType, typename OperationType>
|
||||
inline void Vector<Size,StorageType,OperationType>::setElements(StorageType x, StorageType y, StorageType z)
|
||||
{
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 3, "You can only use this version of setElements() on a vector with at least three elements.");
|
||||
|
||||
|
||||
m_tElements[0] = x;
|
||||
m_tElements[1] = y;
|
||||
m_tElements[2] = z;
|
||||
@ -507,9 +507,9 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size,typename StorageType, typename OperationType>
|
||||
inline void Vector<Size,StorageType,OperationType>::setElements(StorageType x, StorageType y, StorageType z, StorageType w)
|
||||
{
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 4, "You can only use this version of setElements() on a vector with at least four elements.");
|
||||
|
||||
|
||||
m_tElements[0] = x;
|
||||
m_tElements[1] = y;
|
||||
m_tElements[2] = z;
|
||||
@ -539,10 +539,10 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size, typename StorageType, typename OperationType>
|
||||
inline void Vector<Size, StorageType, OperationType>::setZ(StorageType tZ)
|
||||
{
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 3, "You can only set the 'w' component from a vector with at least three elements.");
|
||||
|
||||
m_tElements[2] = tZ;
|
||||
m_tElements[2] = tZ;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -550,10 +550,10 @@ namespace PolyVox
|
||||
*/
|
||||
template <uint32_t Size, typename StorageType, typename OperationType>
|
||||
inline void Vector<Size, StorageType, OperationType>::setW(StorageType tW)
|
||||
{
|
||||
{
|
||||
POLYVOX_STATIC_ASSERT(Size >= 4, "You can only set the 'w' component from a vector with at least four elements.");
|
||||
|
||||
m_tElements[3] = tW;
|
||||
m_tElements[3] = tW;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user