Skip to content

Commit

Permalink
Include mod as nogc
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl authored May 15, 2024
1 parent 90e71e5 commit fcdd565
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inmath/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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); }

Expand Down

0 comments on commit fcdd565

Please sign in to comment.