aboutsummaryrefslogtreecommitdiff
path: root/Client/ThirdParty/fpm/tests/constants.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-12-01 13:34:22 +0800
committerchai <chaifix@163.com>2021-12-01 13:34:22 +0800
commit09abf1b529b4226f585ecfbb20866715b901755b (patch)
tree16929f2a6bee3ad4667bdd006cfcc1e683ab7210 /Client/ThirdParty/fpm/tests/constants.cpp
parent84d961f754c905b37420f4d1b3fee8f4e523e58a (diff)
+fpm
Diffstat (limited to 'Client/ThirdParty/fpm/tests/constants.cpp')
-rw-r--r--Client/ThirdParty/fpm/tests/constants.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/Client/ThirdParty/fpm/tests/constants.cpp b/Client/ThirdParty/fpm/tests/constants.cpp
new file mode 100644
index 0000000..7db8d43
--- /dev/null
+++ b/Client/ThirdParty/fpm/tests/constants.cpp
@@ -0,0 +1,23 @@
+#include "common.hpp"
+
+using P = fpm::fixed_16_16;
+
+TEST(constants, e)
+{
+ EXPECT_EQ(P(2.7182818284590452353602874713527), P::e());
+}
+
+TEST(constants, pi)
+{
+ EXPECT_EQ(P(3.1415926535897932384626433832795), P::pi());
+}
+
+TEST(constants, half_pi)
+{
+ EXPECT_EQ(P(1.5707963267948966192313216916398), P::half_pi());
+}
+
+TEST(constants, two_pi)
+{
+ EXPECT_EQ(P(6.283185307179586476925286766559), P::two_pi());
+}