00001 /* 00002 * fv_float.h 00003 * 00004 * Created on: 22 maj 2014 00005 * Author: dwg 00006 */ 00007 00008 #ifndef FV_FLOAT_H_ 00009 #define FV_FLOAT_H_ 00010 00011 #include"MathHelper.h" 00012 00013 #define USE_DB_PREC 1 00014 00015 00016 00017 00018 00019 #if USE_DB_PREC == 0 00020 typedef float mfvFloat_t; 00021 typedef float ScalarValueType; 00022 typedef FemViewer::fvmath::CVec3f ScalarValueType3; 00023 #define FLOAT_CONVERT(p) p##f 00024 00025 #else 00026 typedef double mfvFloat_t; 00027 typedef double ScalarValueType; 00028 typedef FemViewer::fvmath::CVec3d ScalarValueType3; 00029 #define FLOAT_CONVERT(p) p 00030 #endif 00031 00032 #define COORD_TYPE_FLOAT 1 00033 #if COORD_TYPE_FLOAT == 1 00034 typedef float CoordType; 00035 #else 00036 typedef mfvFloat_t CoordType; 00037 #endif 00038 00039 #define FV_FLOAT_MAX FLOAT_CONVERT(3.2e37) 00040 #define FV_FLOAT_COMPARE FLOAT_CONVERT(3.1e37) 00041 #endif /* FV_FLOAT_H_ */