Skip to content

Commit eb88c84

Browse files
committed
Bug fix: address implicit conversion.
Signed-off-by: apradhana <[email protected]>
1 parent 5ae5f8c commit eb88c84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openvdb/openvdb/math/Math.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ template<> inline std::string negative(const std::string& val) { return val; }
147147
//@{
148148
/// Tolerance for floating-point comparison
149149
template<typename T> struct Tolerance { static T value() { return zeroVal<T>(); } };
150-
template<> struct Tolerance<math::half> { static math::half value() { return 0.00097656; } };
150+
template<> struct Tolerance<math::half> { static math::half value() { return static_cast<math::half>(0.00097656f); } };
151151
template<> struct Tolerance<float> { static float value() { return 1e-8f; } };
152152
template<> struct Tolerance<double> { static double value() { return 1e-15; } };
153153
//@}
154154

155155
//@{
156156
/// Delta for small floating-point offsets
157157
template<typename T> struct Delta { static T value() { return zeroVal<T>(); } };
158-
template<> struct Delta<math::half> { static math::half value() { return 0.00390625; } };
158+
template<> struct Delta<math::half> { static math::half value() { return static_cast<math::half>(0.00390625f); } };
159159
template<> struct Delta<float> { static float value() { return 1e-5f; } };
160160
template<> struct Delta<double> { static double value() { return 1e-9; } };
161161
//@}

0 commit comments

Comments
 (0)