More replacing assert() with POLYVOX_ASSERT.

This commit is contained in:
David Williams
2013-01-01 14:50:58 +00:00
parent 4fcc8a15d7
commit 29720c4568
7 changed files with 33 additions and 32 deletions

View File

@ -33,7 +33,7 @@ namespace PolyVox
const Type& v0,const Type& v1,
const float x)
{
assert((x >= 0.0f) && (x <= 1.0f));
POLYVOX_ASSERT((x >= 0.0f) && (x <= 1.0f), "Interpolation input out of 0.0 to 1.0 range.");
//Interpolate along X
Type v0_1 = (v1 - v0) * x + v0;
@ -46,8 +46,8 @@ namespace PolyVox
const Type& v00,const Type& v10,const Type& v01,const Type& v11,
const float x, const float y)
{
assert((x >= 0.0f) && (y >= 0.0f) &&
(x <= 1.0f) && (y <= 1.0f));
POLYVOX_ASSERT((x >= 0.0f) && (y >= 0.0f) &&
(x <= 1.0f) && (y <= 1.0f), "Interpolation input out of 0.0 to 1.0 range.");
// Linearly interpolate along x
Type v00_10 = lerp(v00, v10, x);
@ -65,8 +65,8 @@ namespace PolyVox
const Type& v001,const Type& v101,const Type& v011,const Type& v111,
const float x, const float y, const float z)
{
assert((x >= 0.0f) && (y >= 0.0f) && (z >= 0.0f) &&
(x <= 1.0f) && (y <= 1.0f) && (z <= 1.0f));
POLYVOX_ASSERT((x >= 0.0f) && (y >= 0.0f) && (z >= 0.0f) &&
(x <= 1.0f) && (y <= 1.0f) && (z <= 1.0f), "Interpolation input out of 0.0 to 1.0 range.");
// Bilinearly interpolate along Y
Type v000_v100__v010_v110 = bilerp(v000, v100, v010, v110, x, y);