Figure out cleaner solution to #403: non-const in initializer list needs narrowing
Problem: calculations are locally done in double, but need to be cast into float for output, ideally without any effort. We also want users to use nested initializer lists for the components of the output objects. And we don't want lots of warnings (or, even worse, errors in clang that work in gcc).
Too much decltype
in !403 (merged)
Maybe add a utility:
namespace eicd {
template <class Vector3, class Float = double>
Vector3 castToFloatVector(const Float v1, const Float v2, const Float v3) {
return {static_cast<float>(v1),
static_cast<float>(v2),
static_cast<float>(v3)};
}
}