summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-03-10 20:30:10 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2017-03-10 20:30:10 +0100
commit92a657290a9ed470ab8b5e8fc895361b15b87995 (patch)
treef17165ac9b2c7d880b45214c08e7fcd4233b006e
parent878d93e7dc508f53495139ab2e18c71fffdab1fd (diff)
Fixed a small compilation bug for MSVC related to a floating-point constant
-rw-r--r--src/utilities/utilities.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utilities/utilities.cpp b/src/utilities/utilities.cpp
index 89265bd6..3d091b64 100644
--- a/src/utilities/utilities.cpp
+++ b/src/utilities/utilities.cpp
@@ -67,8 +67,8 @@ template <> double2 Constant(const double val) { return {val, 0.0}; }
template <typename T> T SmallConstant() { return static_cast<T>(1e-4); }
template float SmallConstant<float>();
template double SmallConstant<double>();
-template <> half SmallConstant() { return FloatToHalf(1e-4); }
-template <> float2 SmallConstant() { return {1e-4, 0.0f}; }
+template <> half SmallConstant() { return FloatToHalf(1e-4f); }
+template <> float2 SmallConstant() { return {1e-4f, 0.0f}; }
template <> double2 SmallConstant() { return {1e-4, 0.0}; }
// Returns the absolute value of a scalar (modulus in case of a complex number)