Introduce osg::asciiToDouble/asciiToFloat function.

This commit is contained in:
Robert Osfield
2008-11-23 11:35:43 +00:00
parent d946a6536e
commit 8264b31fa1
5 changed files with 145 additions and 118 deletions

View File

@@ -16,6 +16,8 @@
#include <math.h>
#include <osg/Export>
//certain math functions were not defined until 10.2
//so this code checks the version so it can add in workarounds for older versions.
#ifdef __APPLE__
@@ -226,6 +228,12 @@ inline float computeVolume(const T& f1,const T& f2,const T& f3,
computeVolume(b1,b3,f2,f3);
}
/** Convert a ascii number to a double, ignoring locale settings.*/
extern OSG_EXPORT double asciiToDouble(const char* str);
/** Convert a ascii number to a float, ignoring locale settings.*/
inline float asciiToFloat(const char* str) { return static_cast<float>(asciiToDouble(str)); }
}
#endif // __OSG_MATH

View File

@@ -21,7 +21,6 @@
namespace osgDB {
class OSGDB_EXPORT Field
{
public: