diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-10 09:09:04 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-10 09:09:04 +0200 |
commit | 7e392fae34242c574218aa6dad928faa7b275613 (patch) | |
tree | a0ded9cb7f5252fc9e392d604e67e22255d8078a /test/const-math.cpp | |
parent | cf6c5668f1d41a0fe02f97351a522ccfb3f245d4 (diff) |
a
Diffstat (limited to 'test/const-math.cpp')
-rw-r--r-- | test/const-math.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/const-math.cpp b/test/const-math.cpp index 1d07d08f..afb42bf3 100644 --- a/test/const-math.cpp +++ b/test/const-math.cpp @@ -14,18 +14,18 @@ using namespace Magnum; using Magnum::Math::Vector; -template<typename vec, typename f> +template<typename vec, typename T> static constexpr void test_float2() { - const vec a{(f)1, (f)2}, b{(f)2, (f)3}; + const vec a{(T)1, (T)2}, b{(T)2, (T)3}; - ASSERT(a[0] == (f)1 && a[1] == (f)2); - ASSERT(a + b == vec{(f)3, (f)5}); - ASSERT(a - b == vec{(f)-1, (f)-1}); - ASSERT(a * b == vec{(f)2, (f)6}); - ASSERT(b / a == vec{(f)2, (f)1.5}); - ASSERT(b.product() == (f)6); - ASSERT(b.sum() == (f)5); + ASSERT(a[0] == (T)1 && a[1] == (T)2); + ASSERT(a + b == vec{(T)3, (T)5}); + ASSERT(a - b == vec{(T)-1, (T)-1}); + ASSERT(a * b == vec{(T)2, (T)6}); + ASSERT(b / a == vec{(T)2, (T)1.5}); + ASSERT(b.product() == (T)6); + ASSERT(b.sum() == (T)5); } template<typename ivec> |