Skip to content

Commit

Permalink
Merge pull request edrosten#90 from aspek2/aspek/assert-fix
Browse files Browse the repository at this point in the history
Update interpolate.h
  • Loading branch information
edrosten authored Oct 19, 2022
2 parents 4e35230 + 4f9a789 commit e1098b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cvd/interpolate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ namespace CVD
///@ingroup gVision
double interpolate_extremum(double d1, double d2, double d3)
{
assert(d2 >= d1 && d2 > d3 || d2 > d1 && d2 >= d3);
assert(d2 <= d1 && d2 < d3 || d2 < d1 && d2 <= d3);
assert(d2 >= d1 && d2 > d3 || d2 > d1 && d2 >= d3 || d2 <= d1 && d2 < d3 || d2 < d1 && d2 <= d3);
//Use Quadratic interpolation to find the peak, position
//and hence the "real" edge position.
return -0.5 * (d3 - d1) / (d3 + d1 - 2 * d2);
Expand Down

0 comments on commit e1098b9

Please sign in to comment.