Added ULP test file

This commit is contained in:
Christophe Riccio 2011-04-26 12:08:30 +01:00
parent c6ccf28186
commit 2ca5985b0e
3 changed files with 16 additions and 15 deletions

View file

@ -53,39 +53,39 @@ namespace ulp
return Count;
}
template <typename valType>
inline detail::xvec2<valType> ulp
template <typename T>
inline detail::xvec2<T> ulp
(
detail::xvec2<valType> const & a,
detail::xvec2<valType> const & b
detail::xvec2<T> const & a,
detail::xvec2<T> const & b
)
{
return detail::xvec2<valType>(
return detail::xvec2<T>(
ulp(a[0], b[0]),
ulp(a[1], b[1]));
}
template <typename valType>
inline detail::xvec3<valType> ulp
template <typename T>
inline detail::xvec3<T> ulp
(
detail::xvec3<valType> const & a,
detail::xvec3<valType> const & b
detail::xvec3<T> const & a,
detail::xvec3<T> const & b
)
{
return detail::xvec2<valType>(
return detail::xvec3<T>(
ulp(a[0], b[0]),
ulp(a[1], b[1]),
ulp(a[2], b[2]));
}
template <typename valType>
inline detail::xvec4<valType> ulp
template <typename T>
inline detail::xvec4<T> ulp
(
detail::xvec4<valType> const & a,
detail::xvec4<valType> const & b
detail::xvec4<T> const & a,
detail::xvec4<T> const & b
)
{
return detail::xvec2<valType>(
return detail::xvec4<T>(
ulp(a[0], b[0]),
ulp(a[1], b[1]),
ulp(a[2], b[2]),

View file

@ -1,3 +1,4 @@
glmCreateTestGTC(gtx-bit)
glmCreateTestGTC(gtx-simd-vec4)
glmCreateTestGTC(gtx-simd-mat4)
glmCreateTestGTC(gtx-ulp)

0
test/gtx/gtx-ulp.cpp Normal file
View file