+namespace
+{
+constexpr float RAY_TEST_ABSOLUTE_EPSILON = Dali::Epsilon<10>::value; ///< 0.0000011920928955078125
+constexpr float RAY_TEST_RELATIVE_EPSILON = Dali::Epsilon<1000>::value; ///< 0.00011920928955078125
+
+/**
+ * @brief Get the epsilon value that we allow to test.
+ * It will be used when some numeric error occured.
+ *
+ * @param targetScale Scale of target value
+ * @return The epsilon value for target scale touch case.
+ */
+constexpr float GetEpsilon(const float targetScale)
+{
+ return std::max(RAY_TEST_ABSOLUTE_EPSILON, RAY_TEST_RELATIVE_EPSILON * targetScale);
+}
+} // namespace
+