mirror of
https://github.com/g-truc/glm.git
synced 2025-04-10 15:23:53 +00:00
Added ULP test file
This commit is contained in:
parent
c6ccf28186
commit
2ca5985b0e
3 changed files with 16 additions and 15 deletions
|
@ -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]),
|
||||
|
|
|
@ -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
0
test/gtx/gtx-ulp.cpp
Normal file
Loading…
Add table
Reference in a new issue