Skip to content

Commit 42c28aa

Browse files
Merge pull request #208 from xconverge/patch-1
Update dsp.h fastmod1f to handle negatives
2 parents 30ade59 + 8572e96 commit 42c28aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Utility/dsp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ inline float fastroot(float f, int n)
9999
*/
100100
inline float fastmod1f(float x)
101101
{
102-
return x - static_cast<int>(x);
102+
return x - floorf(x);
103103
}
104104

105105
/** From http://openaudio.blogspot.com/2017/02/faster-log10-and-pow.html

0 commit comments

Comments
 (0)