From 792749a2d761340a345863bdf8581fdac78a717c Mon Sep 17 00:00:00 2001 From: "d.levin256@gmail.com" Date: Thu, 1 Feb 2024 10:43:21 +0000 Subject: [PATCH] Fix complex operators --- tests/unit/math/complex_math.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/math/complex_math.cpp b/tests/unit/math/complex_math.cpp index e2d96f3c..22587f60 100644 --- a/tests/unit/math/complex_math.cpp +++ b/tests/unit/math/complex_math.cpp @@ -37,6 +37,9 @@ TEST(complex_math) CHECK(cabs(-3.f) == 3.f); CHECK(cabs(make_vector(-3.f)) == make_vector(3.f)); + CHECK(vec{ 100, 100, 100, 100 } + vec{ 1, 2, 3, 4 } == vec{ 101, 102, 103, 104 }); + CHECK(c32{ 100 } + vec{ 1, 2, 3, 4 } == vec{ 101, 102, 103, 104 }); + CHECK(carg(c32{ +1.f, 0.f }) == 0.f); CHECK(carg(c32{ 0.f, +1.f }) == c_pi / 2); CHECK(carg(c32{ 0.f, -1.f }) == -c_pi / 2);