|
|
17eabd |
diff -up ilmbase-2.2.0/Imath/ImathFun.h.glibc_iszero ilmbase-2.2.0/Imath/ImathFun.h
|
|
|
17eabd |
--- ilmbase-2.2.0/Imath/ImathFun.h.glibc_iszero 2014-08-09 21:03:39.000000000 -0500
|
|
|
17eabd |
+++ ilmbase-2.2.0/Imath/ImathFun.h 2016-10-16 09:43:04.514932845 -0500
|
|
|
17eabd |
@@ -132,7 +132,7 @@ cmpt (T a, T b, T t)
|
|
|
17eabd |
|
|
|
17eabd |
template <class T>
|
|
|
17eabd |
inline bool
|
|
|
17eabd |
-iszero (T a, T t)
|
|
|
17eabd |
+(iszero) (T a, T t)
|
|
|
17eabd |
{
|
|
|
17eabd |
return (IMATH_INTERNAL_NAMESPACE::abs (a) <= t) ? 1 : 0;
|
|
|
17eabd |
}
|
|
|
17eabd |
diff -up ilmbase-2.2.0/ImathTest/testFrustum.cpp.glibc_iszero ilmbase-2.2.0/ImathTest/testFrustum.cpp
|
|
|
17eabd |
--- ilmbase-2.2.0/ImathTest/testFrustum.cpp.glibc_iszero 2014-08-09 21:03:40.000000000 -0500
|
|
|
17eabd |
+++ ilmbase-2.2.0/ImathTest/testFrustum.cpp 2016-10-16 09:44:45.466666479 -0500
|
|
|
17eabd |
@@ -88,10 +88,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f pt = (! ortho) ? o :
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f (0.0f, frustum.top(), 0.0f);
|
|
|
17eabd |
float d = planes0[0].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
pt = pt * mView;
|
|
|
17eabd |
d = planes[0].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f right = IMATH_INTERNAL_NAMESPACE::V3f(1, 0, 0);
|
|
|
17eabd |
assert ((right ^ planes0[1].normal) > 0.0);
|
|
|
17eabd |
@@ -101,10 +101,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES
|
|
|
17eabd |
pt = (! ortho) ? o :
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f (frustum.right(), 0.0f, 0.0f);
|
|
|
17eabd |
d = planes0[1].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
pt = pt * mView;
|
|
|
17eabd |
d = planes[1].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f down = IMATH_INTERNAL_NAMESPACE::V3f(0, -1, 0);
|
|
|
17eabd |
assert ((down ^ planes0[2].normal) > 0.0);
|
|
|
17eabd |
@@ -114,10 +114,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES
|
|
|
17eabd |
pt = (! ortho) ? o :
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f (0.0f, frustum.bottom(), 0.0f);
|
|
|
17eabd |
d = planes0[2].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
pt = pt * mView;
|
|
|
17eabd |
d = planes[2].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f left = IMATH_INTERNAL_NAMESPACE::V3f(-1, 0, 0);
|
|
|
17eabd |
assert ((left ^ planes0[3].normal) > 0.0);
|
|
|
17eabd |
@@ -127,10 +127,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES
|
|
|
17eabd |
pt = (! ortho) ? o :
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f (frustum.left(), 0.0f, 0.0f);
|
|
|
17eabd |
d = planes0[3].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
pt = pt * mView;
|
|
|
17eabd |
d = planes[3].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f front = IMATH_INTERNAL_NAMESPACE::V3f(0, 0, 1);
|
|
|
17eabd |
assert ((front ^ planes0[4].normal) > 0.0);
|
|
|
17eabd |
@@ -139,10 +139,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES
|
|
|
17eabd |
|
|
|
17eabd |
pt = IMATH_INTERNAL_NAMESPACE::V3f (0.0f, 0.0f, -frustum.nearPlane());
|
|
|
17eabd |
d = planes0[4].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
pt = pt * mView;
|
|
|
17eabd |
d = planes[4].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
|
|
|
17eabd |
IMATH_INTERNAL_NAMESPACE::V3f back = IMATH_INTERNAL_NAMESPACE::V3f(0, 0, -1);
|
|
|
17eabd |
assert ((back ^ planes0[5].normal) > 0.0);
|
|
|
17eabd |
@@ -151,10 +151,10 @@ testFrustumPlanes (IMATH_INTERNAL_NAMES
|
|
|
17eabd |
|
|
|
17eabd |
pt = IMATH_INTERNAL_NAMESPACE::V3f (0.0f, 0.0f, -frustum.farPlane());
|
|
|
17eabd |
d = planes0[5].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
pt = pt * mView;
|
|
|
17eabd |
d = planes[5].distanceTo (pt);
|
|
|
17eabd |
- assert (IMATH_INTERNAL_NAMESPACE::iszero (d, eps));
|
|
|
17eabd |
+ assert ((IMATH_INTERNAL_NAMESPACE::iszero) (d, eps));
|
|
|
17eabd |
}
|
|
|
17eabd |
}
|
|
|
17eabd |
}
|