Skip to content

Commit

Permalink
Remove references to pow(x,0.5), use sqrt instead (#12928)
Browse files Browse the repository at this point in the history
* Remove references to pow(x,0.5), use sqrt instead

* Update matrix library
  • Loading branch information
Julian Kent authored Sep 10, 2019
1 parent 47e668e commit a8fbe6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/controllib/BlockStats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class __EXPORT BlockStats: public Block
}
matrix::Vector<Type, M> getStdDev()
{
return getVar().pow(0.5f);
return getVar().sqrt();
}
private:
// attributes
Expand Down
2 changes: 1 addition & 1 deletion src/lib/matrix
2 changes: 1 addition & 1 deletion src/systemcmds/tests/test_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ bool MatrixTest::vectorTests()
ut_test(isEqual(v2, v3));
float data1_sq[] = {1, 4, 9, 16, 25};
Vector<float, 5> v4(data1_sq);
ut_test(isEqual(v1, v4.pow(0.5)));
ut_test(isEqual(v1, v4.sqrt()));

return true;
}
Expand Down

0 comments on commit a8fbe6b

Please sign in to comment.