add fmodfp
This commit is contained in:
@@ -25,6 +25,15 @@
|
||||
|
||||
unsigned long randseed = time(NULL);
|
||||
|
||||
/* Return a positive x mod y. */
|
||||
float fmodfp(float x, float y)
|
||||
{
|
||||
x = fmodf(x, y); /* x is [-y,y] */
|
||||
x += y; /* x is [0,y*2] */
|
||||
x = fmodf(x, y); /* x is [0,y] */
|
||||
return x;
|
||||
}
|
||||
|
||||
int power_of_two(int input)
|
||||
{
|
||||
int value = 1;
|
||||
|
||||
@@ -113,6 +113,9 @@ inline float froundf( const float f, const float fRoundInterval )
|
||||
return int( (f + fRoundInterval/2)/fRoundInterval ) * fRoundInterval;
|
||||
}
|
||||
|
||||
/* Return a positive x mod y. */
|
||||
float fmodfp(float x, float y);
|
||||
|
||||
int power_of_two(int input);
|
||||
bool IsAnInt( const CString &s );
|
||||
bool IsHexVal( const CString &s );
|
||||
|
||||
Reference in New Issue
Block a user