2016-06-15 19:16:27 +02:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Created : 2007-03-16
|
|
|
|
// Updated : 2008-10-24
|
|
|
|
// Licence : This source is under MIT License
|
|
|
|
// File : glm/gtx/compatibility.inl
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
namespace glm
|
|
|
|
{
|
|
|
|
// isfinite
|
|
|
|
template <typename genType>
|
2016-11-03 13:20:25 +01:00
|
|
|
inline bool isfinite(
|
2016-06-15 19:16:27 +02:00
|
|
|
genType const & x)
|
|
|
|
{
|
2016-11-03 14:18:53 +01:00
|
|
|
# if(GLM_COMPILER & GLM_COMPILER_VC)
|
2016-06-15 19:16:27 +02:00
|
|
|
return _finite(x);
|
|
|
|
# elif(GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
|
|
|
return _isfinite(x) != 0;
|
|
|
|
# else
|
|
|
|
return isfinite(x) != 0;
|
|
|
|
# endif
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T, precision P>
|
2016-11-03 13:20:25 +01:00
|
|
|
inline detail::tvec2<bool, P> isfinite(
|
2016-06-15 19:16:27 +02:00
|
|
|
detail::tvec2<T, P> const & x)
|
|
|
|
{
|
|
|
|
return detail::tvec2<bool, P>(
|
|
|
|
isfinite(x.x),
|
|
|
|
isfinite(x.y));
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T, precision P>
|
2016-11-03 13:20:25 +01:00
|
|
|
inline detail::tvec3<bool, P> isfinite(
|
2016-06-15 19:16:27 +02:00
|
|
|
detail::tvec3<T, P> const & x)
|
|
|
|
{
|
|
|
|
return detail::tvec3<bool, P>(
|
|
|
|
isfinite(x.x),
|
|
|
|
isfinite(x.y),
|
|
|
|
isfinite(x.z));
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T, precision P>
|
2016-11-03 13:20:25 +01:00
|
|
|
inline detail::tvec4<bool, P> isfinite(
|
2016-06-15 19:16:27 +02:00
|
|
|
detail::tvec4<T, P> const & x)
|
|
|
|
{
|
|
|
|
return detail::tvec4<bool, P>(
|
|
|
|
isfinite(x.x),
|
|
|
|
isfinite(x.y),
|
|
|
|
isfinite(x.z),
|
|
|
|
isfinite(x.w));
|
|
|
|
}
|
|
|
|
|
|
|
|
}//namespace glm
|