ulp.hpp

00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2011-02-21
00005 // Updated : 2009-02-21
00006 // Licence : This source is under MIT License
00007 // File    : glm/gtx/ulp.hpp
00009 // Dependency:
00010 // - GLM core
00012 
00013 #ifndef glm_gtx_ulp
00014 #define glm_gtx_ulp
00015 
00016 // Dependency:
00017 #include "../glm.hpp"
00018 
00019 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
00020 #       pragma message("GLM: GLM_GTX_ulp extension included")
00021 #endif
00022 
00023 namespace glm
00024 {
00025         namespace gtx{
00027         namespace ulp
00028         {
00031 
00034         template <typename genType>
00035         genType next_float(genType const & x);
00036         
00039         template <typename genType>
00040         genType prev_float(genType const & x);
00041 
00044         template <typename genType>
00045         genType next_float(genType const & x, uint const & Distance);
00046         
00049         template <typename genType>
00050         genType prev_float(genType const & x, uint const & Distance);
00051         
00054         template <typename T>
00055         uint float_distance(T const & x, T const & y);
00056         
00059         template<typename T, template<typename> class vecType>
00060         vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
00061         
00063 
00064         }//namespace ulp
00065         }//namespace gtx
00066 }//namespace glm
00067 
00068 #include "ulp.inl"
00069 
00070 namespace glm{using namespace gtx::ulp;}
00071 
00072 #endif//glm_gtx_ulp
00073