summaryrefslogtreecommitdiffstats
path: root/scaddins
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-18 15:42:27 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-18 17:02:26 +0200
commitce239f392cd22a9f5ca7146272fc020395f865f5 (patch)
tree5420fa593f8563f6f955e870b431cfae41d15c25 /scaddins
parentKill check-merged.sh, 'git cherry' actually gives better results. (diff)
downloadcore-ce239f392cd22a9f5ca7146272fc020395f865f5.tar.gz
core-ce239f392cd22a9f5ca7146272fc020395f865f5.zip
RANDBETWEEN is supposed to return an integer
Change-Id: I82e7963b55cf2ab28c193f40fe8f30e097364653
Diffstat (limited to 'scaddins')
-rw-r--r--scaddins/source/analysis/analysis.cxx2
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 );
}