- added precision.h file

This commit is contained in:
granzuglia 2014-10-06 08:27:24 +00:00
parent 81bdd19245
commit adca0d032e
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#ifndef __VCGLIB_PRECISION
#define __VCGLIB_PRECISION
namespace vcg
{
namespace tri
{
namespace io
{
template<typename SCALAR>
struct Precision
{};
template<>
struct Precision<float>
{
static int digits() {return 7;}
static const char* typeName() {return "float";}
};
template<>
struct Precision<double>
{
static int digits() {return 16;}
static const char* typeName() {return "double";}
};
}
}
}
#endif