We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d270fc commit cccf9e3Copy full SHA for cccf9e3
src/arkreactor/Builtins/Builtins.cpp
@@ -1,6 +1,6 @@
1
-#define _USE_MATH_DEFINES
2
-#include <cmath>
3
#include <limits>
+#include <numbers>
+#include <cmath>
4
5
#include <Ark/Builtins/Builtins.hpp>
6
@@ -12,10 +12,10 @@ namespace Ark::internal::Builtins
12
13
namespace Mathematics
14
{
15
- extern const Value pi_ = Value(M_PI);
+ extern const Value pi_ = Value(std::numbers::pi);
16
extern const Value e_ = Value(std::exp(1.0));
17
- extern const Value tau_ = Value(M_PI * 2.0);
18
- extern const Value inf_ = Value(HUGE_VAL);
+ extern const Value tau_ = Value(std::numbers::pi * 2.0);
+ extern const Value inf_ = Value(std::numeric_limits<double>::infinity());
19
extern const Value nan_ = Value(std::numeric_limits<double>::signaling_NaN());
20
}
21
0 commit comments