IGL_PREDICATES_ASSERT_SCALAR.h 683 B

123456789101112131415
  1. #ifndef IGL_PREDICATES_ASSERT_SCALAR_H
  2. #include <type_traits>
  3. #ifdef LIBIGL_PREDICATES_USE_FLOAT
  4. #define IGL_PREDICATES_ASSERT_SCALAR(Vector) \
  5. static_assert( \
  6. std::is_same<typename Vector::Scalar, float>::value, \
  7. "Shewchuk's exact predicates only support float")
  8. #else
  9. #define IGL_PREDICATES_ASSERT_SCALAR(Vector) \
  10. static_assert( \
  11. std::is_same<typename Vector::Scalar, double>::value || \
  12. std::is_same<typename Vector::Scalar, float>::value, \
  13. "Shewchuk's exact predicates only support float and double")
  14. #endif
  15. #endif