fix wrap(float) not working; caused receptors to not flash before beat 0
This commit is contained in:
@@ -64,7 +64,7 @@ inline void wrap( int &x, int n)
|
|||||||
inline void wrap( float &x, float n)
|
inline void wrap( float &x, float n)
|
||||||
{
|
{
|
||||||
if (x<0)
|
if (x<0)
|
||||||
x += ((-x/n)+1)*n;
|
x += truncf(((-x/n)+1))*n;
|
||||||
|
|
||||||
x = fmodf(x,n);
|
x = fmodf(x,n);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user