Floating point checks cannot be disabled
elliotwoods opened this issue · comments
As mentioned in #378
It is often advantageous to be able to perform glm math functions on non-floating point types (e.g. Ceres Solver JetT for automatic differentiation).
Here I'm requesting that glm either:
- Offers a
#define
which disables theGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559,
lines - Allow for specific user-defined types to be added to the checklist
Example functions are in func_geometric.inl
It does seem possible to workaround this with the following include-pattern:
#include <ceres/ceres.h>
namespace std {
template<typename T, int N>
struct numeric_limits<ceres::Jet<T, N> > {
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_iec559 = true;
};
}
#include <glm/glm.hpp>
This issue is resolved with this PR: #1195
Thanks for contributing!