summaryrefslogtreecommitdiff
path: root/opencl/source/opencl_device.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'opencl/source/opencl_device.cxx')
-rw-r--r--opencl/source/opencl_device.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index 9a10d3651d1d..32a94df5dcb3 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -29,6 +29,7 @@
#include <opencl/openclwrapper.hxx>
#include <opencl/platforminfo.hxx>
#include <sal/log.hxx>
+#include <rtl/math.hxx>
#include "opencl_device.hxx"
@@ -175,7 +176,7 @@ double timerCurrent(timer* mytimer)
/* Random number generator */
double random(double min, double max)
{
- if (min == max)
+ if (rtl::math::approxEqual(min, max))
return min;
return comphelper::rng::uniform_real_distribution(min, max);
}