diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-09 14:48:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-10 08:58:20 +0100 |
commit | 5b2f8231945fedc46425e00f1234dcac90628c1d (patch) | |
tree | 7cdee4b82bd29d59292d0a4bd4df4e816317192c /scaddins | |
parent | 315afb12853624bdaac553a8528390c3a61c8351 (diff) |
add a SAL_RAND_REPEATABLE for repeatable random nums
merge the formula and comphelper ones together
Change-Id: I2e7e2cdb176afc6982e384fa1e007da5b914e6f0
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/Library_analysis.mk | 1 | ||||
-rw-r--r-- | scaddins/source/analysis/analysis.cxx | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/scaddins/Library_analysis.mk b/scaddins/Library_analysis.mk index 4946c5f74107..cafce60604a7 100644 --- a/scaddins/Library_analysis.mk +++ b/scaddins/Library_analysis.mk @@ -33,7 +33,6 @@ $(eval $(call gb_Library_use_libraries,analysis,\ comphelper \ cppu \ cppuhelper \ - for \ sal \ tl \ i18nlangtag \ diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx index d6d30474e244..08ac8620e7d7 100644 --- a/scaddins/source/analysis/analysis.cxx +++ b/scaddins/source/analysis/analysis.cxx @@ -22,8 +22,8 @@ #include "bessel.hxx" #include <cppuhelper/factory.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/random.hxx> #include <cppuhelper/supportsservice.hxx> -#include <formula/random.hxx> #include <osl/diagnose.h> #include <rtl/ustrbuf.hxx> #include <rtl/math.hxx> @@ -693,7 +693,7 @@ double SAL_CALL AnalysisAddIn::getRandbetween( double fMin, double fMax ) throw( if( fMin > fMax ) throw lang::IllegalArgumentException(); - double fRet = floor(formula::rng::fRandom(fMin, nextafter(fMax+1, -DBL_MAX))); + double fRet = floor(comphelper::rng::uniform_real_distribution(fMin, nextafter(fMax+1, -DBL_MAX))); RETURN_FINITE( fRet ); } |