From a8fbe6bba2b478b2a0945b822b82f713e979be23 Mon Sep 17 00:00:00 2001 From: Julian Kent Date: Tue, 10 Sep 2019 13:29:39 +0200 Subject: [PATCH] Remove references to pow(x,0.5), use sqrt instead (#12928) * Remove references to pow(x,0.5), use sqrt instead * Update matrix library --- src/lib/controllib/BlockStats.hpp | 2 +- src/lib/matrix | 2 +- src/systemcmds/tests/test_matrix.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/controllib/BlockStats.hpp b/src/lib/controllib/BlockStats.hpp index 9f26ad6004..22c1359f62 100644 --- a/src/lib/controllib/BlockStats.hpp +++ b/src/lib/controllib/BlockStats.hpp @@ -89,7 +89,7 @@ public: } matrix::Vector getStdDev() { - return getVar().pow(0.5f); + return getVar().sqrt(); } private: // attributes diff --git a/src/lib/matrix b/src/lib/matrix index 22bf63cb71..15865b741c 160000 --- a/src/lib/matrix +++ b/src/lib/matrix @@ -1 +1 @@ -Subproject commit 22bf63cb714156eafd8a6d3822b903eba4980a8a +Subproject commit 15865b741ccc49322a8ffd445d9814eba9f94710 diff --git a/src/systemcmds/tests/test_matrix.cpp b/src/systemcmds/tests/test_matrix.cpp index af9ab4a6b4..57f07ecba1 100644 --- a/src/systemcmds/tests/test_matrix.cpp +++ b/src/systemcmds/tests/test_matrix.cpp @@ -644,7 +644,7 @@ bool MatrixTest::vectorTests() ut_test(isEqual(v2, v3)); float data1_sq[] = {1, 4, 9, 16, 25}; Vector v4(data1_sq); - ut_test(isEqual(v1, v4.pow(0.5))); + ut_test(isEqual(v1, v4.sqrt())); return true; }