Skip to content

Commit 1fdd515

Browse files
yktyagijohguenther
authored andcommitted
use fully-qualified rkcommon::math::rsqrt to avoid overload ambiguity
Explicitly calling rkcommon::math::rsqrt() prevents conflict with the standard rsqrt(double) declared in bits/mathcalls.h, fixing the build error in Quaternion tests. Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
1 parent ecd1d47 commit 1fdd515

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/math/test_Quaternion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ template <typename T>
187187
inline void test_slerp()
188188
{
189189
typename T::Scalar two = 2;
190-
REQUIRE(CmpT(slerp(.5f, T(1, 0, 0, 0), T(0, 1, 0, 0)), T(rsqrt(two), rsqrt(two), 0, 0)));
190+
REQUIRE(CmpT(slerp(.5f, T(1, 0, 0, 0), T(0, 1, 0, 0)), T(rkcommon::math::rsqrt(two), rkcommon::math::rsqrt(two), 0, 0)));
191191
}
192192

193193
TEST_CASE("Quaternion functions", "[quat]")

tests/math/test_rkmath.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ TEST_CASE("rkmath rcp_safe function", "[rkmath]")
4949
template <typename T>
5050
inline void test_rsqrt()
5151
{
52-
REQUIRE(CmpT<T>(rsqrt(T(1)), T(1)));
53-
REQUIRE(CmpT<T>(rsqrt(T(4)), T(.5)));
52+
REQUIRE(CmpT<T>(rkcommon::math::rsqrt(T(1)), T(1)));
53+
REQUIRE(CmpT<T>(rkcommon::math::rsqrt(T(4)), T(.5)));
5454
}
5555

5656
TEST_CASE("rkmath rsqrt function", "[rkmath]")

0 commit comments

Comments
 (0)