Skip to content

Commit 45193df

Browse files
committed
Bug fix: invalid initialization of the vector used to perform 3D quadric fit
1 parent 52dc573 commit 45193df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Neighbourhood.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ bool Neighbourhood::computeQuadric()
368368

369369
double lmax2 = 0; //max (squared) dimension
370370

371-
//for every points
371+
//for every point
372372
{
373373
double* _A = A.data();
374374
double* _b = b.data();
@@ -379,7 +379,7 @@ bool Neighbourhood::computeQuadric()
379379
*_A++ = 1.0;
380380
*_A++ = l.x;
381381
*_A++ = l.y;
382-
*_A = static_cast<double>(l.x)*l.y;
382+
*_A = static_cast<double>(l.x)*l.x;
383383
//by the way, we track the max 'X' squared dimension
384384
lmax2 = std::max(lmax2, *_A);
385385

0 commit comments

Comments
 (0)