Merge pull request #27342 from MaximSmolskiy:fix-bug-in-solvePoly-test

Fix bug in solvePoly test
This commit is contained in:
Alexander Smorkalov 2025-05-21 11:19:01 +03:00 committed by GitHub
commit dc610867e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2435,7 +2435,7 @@ static void checkRoot(Mat& r, T re, T im)
{
for (int i = 0; i < r.cols*r.rows; i++)
{
Vec<T, 2> v = *(Vec<T, 2>*)r.ptr(i);
Vec<T, 2>& v = *(Vec<T, 2>*)r.ptr(i);
if (fabs(re - v[0]) < 1e-6 && fabs(im - v[1]) < 1e-6)
{
v[0] = std::numeric_limits<T>::quiet_NaN();