Introduce osg::asciiToDouble/asciiToFloat function.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
namespace osgDB {
|
||||
|
||||
|
||||
class OSGDB_EXPORT Field
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user