Move fmod runtime export to Plugs/RuntimeExports.cs

This commit is contained in:
Stone_Red
2026-06-17 16:38:55 +02:00
parent 6d768861ea
commit 79bc87f5c7
2 changed files with 18 additions and 16 deletions
+18
View File
@@ -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);
}
}