diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-18 15:42:27 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-18 17:02:26 +0200 |
commit | ce239f392cd22a9f5ca7146272fc020395f865f5 (patch) | |
tree | 5420fa593f8563f6f955e870b431cfae41d15c25 /scaddins/source/analysis | |
parent | 4066cc6bcba2c2e8d9529a2557870e384756a098 (diff) |
RANDBETWEEN is supposed to return an integer
Change-Id: I82e7963b55cf2ab28c193f40fe8f30e097364653
Diffstat (limited to 'scaddins/source/analysis')
-rw-r--r-- | scaddins/source/analysis/analysis.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx index 63a532a1f56f..c0137f372e7d 100644 --- a/scaddins/source/analysis/analysis.cxx +++ b/scaddins/source/analysis/analysis.cxx @@ -702,7 +702,7 @@ double SAL_CALL AnalysisAddIn::getRandbetween( double fMin, double fMax ) throw( if( fMin > fMax ) throw lang::IllegalArgumentException(); - double fRet = comphelper::rng::uniform_real_distribution(fMin, boost::math::nextafter(fMax, DBL_MAX)); + double fRet = floor(comphelper::rng::uniform_real_distribution(fMin, boost::math::nextafter(fMax+1, -DBL_MAX))); RETURN_FINITE( fRet ); } |