About Store Forum Documentation Contact



Post Reply 
fmod missing in Math.h
Author Message
BlackHornet Offline
Member

Post: #1
fmod missing in Math.h
Hi,

maybe you could add the fmod function wrapper to EE, it isn't nessecary to include math.h standard header manually?
http://www.mkssoftware.com/docs/man3/fmod.3.asp

Regards

Urbanity Online: http://www.facebook.com/pages/Urbanity-Online/162454237136358
Join the Esenthel IRC Channel @ Freenode: http://webchat.freenode.net/?channels=##Esenthel
(This post was last modified: 09-14-2011 03:35 PM by BlackHornet.)
09-14-2011 03:33 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: fmod missing in Math.h
You can use Frac Round Trunc Floor Ceil functions
09-15-2011 05:31 PM
Find all posts by this user Quote this message in a reply
BlackHornet Offline
Member

Post: #3
RE: fmod missing in Math.h
ok...

So I write my own
Code:
Flt FMod(Flt y, Flt x)
{
  return = y - Trunc(y/x)*x;
}

Urbanity Online: http://www.facebook.com/pages/Urbanity-Online/162454237136358
Join the Esenthel IRC Channel @ Freenode: http://webchat.freenode.net/?channels=##Esenthel
09-15-2011 08:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: fmod missing in Math.h
actually it's already present in the engine Flt Frac(Flt x, Flt range)
it works the same for positive values like fmod, I haven't tested it for negative values
10-01-2011 12:40 PM
Find all posts by this user Quote this message in a reply
Post Reply