diff --git a/Kernel.cs b/Kernel.cs index e544ac7..a1c986d 100644 --- a/Kernel.cs +++ b/Kernel.cs @@ -6,8 +6,6 @@ using RemSox.Processing; using RemSox.UI.CLI; using RemSox.UI.CLI.Commands; -using System.Runtime; - namespace RemSox; /// @@ -65,17 +63,3 @@ public class Kernel : Sys.Kernel } } -public static unsafe partial class StartupCodeHelpers -{ - [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); - } -} \ No newline at end of file diff --git a/Plugs/RuntimeExports.cs b/Plugs/RuntimeExports.cs new file mode 100644 index 0000000..674da23 --- /dev/null +++ b/Plugs/RuntimeExports.cs @@ -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); + } +}