From fcdd56558d91738404fa9ea18d4b18c5f2f6ae50 Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 15 May 2024 11:37:00 +0200 Subject: [PATCH] Include mod as nogc --- inmath/math.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inmath/math.d b/inmath/math.d index 55ff2d0..e79ca7e 100644 --- a/inmath/math.d +++ b/inmath/math.d @@ -41,8 +41,11 @@ private { } } +@nogc nothrow: + /// PI / 180 at compiletime, used for degrees/radians conversion. public enum real PI_180 = PI / 180; + /// 180 / PI at compiletime, used for degrees/radians conversion. public enum real _180_PI = 180 / PI; @@ -51,7 +54,7 @@ T mod(T)(T x, T y) { // std.math.floor is not pure return x - y * floor(x/y); } -@safe pure @nogc nothrow: +@safe pure: extern (C) { float fmodf(float x, float y); }