mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-07 07:46:28 +02:00
Move fmod runtime export to Plugs/RuntimeExports.cs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.Runtime;
|
||||
|
||||
namespace RemSox.Plugs;
|
||||
|
||||
public static partial class RuntimeExports
|
||||
{
|
||||
[RuntimeExport("fmod")]
|
||||
public static double fmod(double x, double y)
|
||||
{
|
||||
if (Math.Abs(y) < double.Epsilon)
|
||||
{
|
||||
return double.NaN;
|
||||
}
|
||||
|
||||
double q = Math.Truncate(x / y);
|
||||
return x - (q * y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user