fixed a fast_atof bug with negative exponents
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@702 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
c729f356f0
commit
88cb2efacc
|
@ -1,5 +1,7 @@
|
||||||
Changes in version 1.3.1 (?? Mar 2007)
|
Changes in version 1.3.1 (?? Mar 2007)
|
||||||
|
|
||||||
|
- Fixed a bug with negative exponents in fast_atof, posted by RVL
|
||||||
|
|
||||||
- renamed IAnimatedMeshSceneNode::getAbsoluteTransformation to getMD3TagTransformation
|
- renamed IAnimatedMeshSceneNode::getAbsoluteTransformation to getMD3TagTransformation
|
||||||
to avoid conflicts with ISceneNode::getAbsoluteTransformation
|
to avoid conflicts with ISceneNode::getAbsoluteTransformation
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,14 @@ inline const char* fast_atof_move( const char* c, float& out)
|
||||||
{
|
{
|
||||||
++c;
|
++c;
|
||||||
//float exp = (float)strtol(c, &t, 10);
|
//float exp = (float)strtol(c, &t, 10);
|
||||||
|
bool einv = (*c=='-');
|
||||||
|
if (einv)
|
||||||
|
c++;
|
||||||
|
|
||||||
float exp = (float)strtol10(c, t);
|
float exp = (float)strtol10(c, t);
|
||||||
|
if (einv)
|
||||||
|
exp *= -1.0f;
|
||||||
|
|
||||||
f *= (float)pow(10.0f, exp);
|
f *= (float)pow(10.0f, exp);
|
||||||
c = t;
|
c = t;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue