mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user