STYLE: consistent rounding for float/double underflow (issue #625)

- use (value <= VSMALL) instead of (value < VSMALL) for consistency
  with what equal(value, 0) delivers.
This commit is contained in:
Mark Olesen
2017-10-30 11:38:24 +01:00
parent ba8fdda5cc
commit 7e4f3a8237

View File

@ -115,7 +115,7 @@ bool readScalar(const char* buf, Scalar& val)
// Round underflow to zero
val =
(
(parsed > -ScalarVSMALL && parsed < ScalarVSMALL)
(parsed >= -ScalarVSMALL && parsed <= ScalarVSMALL)
? 0
: Scalar(parsed)
);