diff options
author | chai <chaifix@163.com> | 2021-12-01 13:34:22 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-12-01 13:34:22 +0800 |
commit | 09abf1b529b4226f585ecfbb20866715b901755b (patch) | |
tree | 16929f2a6bee3ad4667bdd006cfcc1e683ab7210 /Client/ThirdParty/fpm/tests/constants.cpp | |
parent | 84d961f754c905b37420f4d1b3fee8f4e523e58a (diff) |
+fpm
Diffstat (limited to 'Client/ThirdParty/fpm/tests/constants.cpp')
-rw-r--r-- | Client/ThirdParty/fpm/tests/constants.cpp | 23 |
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()); +} |