Recommended change for double precision compiling

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Van
Hobgoblin
Posts: 512
Joined: Fri Nov 19, 2004 3:56 am
Contact:

Recommended change for double precision compiling

Post by Van » Tue Apr 19, 2005 1:29 pm

Compiler: MS 7.1

File: OgreAutoParamDataSource.cpp
Line: 401

Symptom:
When compiling with #define OGRE_DOUBLE_PRECISION 1 the following code failes compilation because the compiler can not resolve the intended overload to use:

Code: Select all


	Real AutoParamDataSource::getTime_0_X(Real x) const
	{
		return fmod(Root::getSingleton().getTimer()->getMilliseconds() / 1000.0f
			, x);
	}

I changed it to

Code: Select all


	Real AutoParamDataSource::getTime_0_X(Real x) const
	{
		return fmod((Ogre::Real) Root::getSingleton().getTimer()->getMilliseconds() / 1000.0f
			, x);
	}

which made the compiler happy.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Tue Apr 19, 2005 5:47 pm

You can submit a patch for it - otherwise it will get lost here :wink:
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Tue Apr 19, 2005 6:18 pm

Odd, that code builds just fine without modifications for me with OGRE_DOUBLE_PRECISION 1. Must be a VC7.1 thing.
0 x

Post Reply