Tony-LunarG | b0b195d | 2015-05-13 15:01:06 -0600 | [diff] [blame] | 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) |
| 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 4 | // Created : 2007-03-16 |
| 5 | // Updated : 2008-10-24 |
| 6 | // Licence : This source is under MIT License |
| 7 | // File : glm/gtx/compatibility.inl |
| 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 9 | |
| 10 | namespace glm |
| 11 | { |
| 12 | // isfinite |
| 13 | template <typename genType> |
| 14 | GLM_FUNC_QUALIFIER bool isfinite( |
| 15 | genType const & x) |
| 16 | { |
| 17 | # if(GLM_LANG & GLM_LANG_CXX11_FLAG) |
| 18 | return std::isfinite(x) != 0; |
| 19 | # elif(GLM_COMPILER & GLM_COMPILER_VC) |
| 20 | return _finite(x); |
| 21 | # elif(GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID) |
| 22 | return _isfinite(x) != 0; |
| 23 | # else |
| 24 | return isfinite(x) != 0; |
| 25 | # endif |
| 26 | } |
| 27 | |
| 28 | template <typename T, precision P> |
| 29 | GLM_FUNC_QUALIFIER detail::tvec2<bool, P> isfinite( |
| 30 | detail::tvec2<T, P> const & x) |
| 31 | { |
| 32 | return detail::tvec2<bool, P>( |
| 33 | isfinite(x.x), |
| 34 | isfinite(x.y)); |
| 35 | } |
| 36 | |
| 37 | template <typename T, precision P> |
| 38 | GLM_FUNC_QUALIFIER detail::tvec3<bool, P> isfinite( |
| 39 | detail::tvec3<T, P> const & x) |
| 40 | { |
| 41 | return detail::tvec3<bool, P>( |
| 42 | isfinite(x.x), |
| 43 | isfinite(x.y), |
| 44 | isfinite(x.z)); |
| 45 | } |
| 46 | |
| 47 | template <typename T, precision P> |
| 48 | GLM_FUNC_QUALIFIER detail::tvec4<bool, P> isfinite( |
| 49 | detail::tvec4<T, P> const & x) |
| 50 | { |
| 51 | return detail::tvec4<bool, P>( |
| 52 | isfinite(x.x), |
| 53 | isfinite(x.y), |
| 54 | isfinite(x.z), |
| 55 | isfinite(x.w)); |
| 56 | } |
| 57 | |
| 58 | }//namespace glm |