Much better tests, and a little bit more functionality.

This commit is contained in:
Tal Hadad
2015-12-20 12:49:12 +02:00
parent 5e0a178df2
commit 6752a69aa5
3 changed files with 158 additions and 9 deletions

View File

@@ -31,6 +31,26 @@ namespace Eigen
enum { value = -Num };
};
template <bool Cond>
struct NegativeIf
{
template <typename T>
static T run(const T& t)
{
return -t;
}
};
template <>
struct NegativeIf<false>
{
template <typename T>
static T run(const T& t)
{
return t;
}
};
template <bool Cond>
struct NegateIf
{
@@ -45,7 +65,7 @@ namespace Eigen
struct NegateIf<false>
{
template <typename T>
static void run(T& t)
static void run(T&)
{
// no op
}
@@ -113,7 +133,7 @@ namespace Eigen
};
template <typename Derived>
static void eulerAngles_imp(Matrix<typename MatrixBase<Derived>::Scalar, 3, 1>& res, const MatrixBase<Derived>& mat, internal::true_type isTaitBryan)
static void eulerAngles_imp(Matrix<typename MatrixBase<Derived>::Scalar, 3, 1>& res, const MatrixBase<Derived>& mat, internal::true_type /*isTaitBryan*/)
{
using std::atan2;
using std::sin;
@@ -136,7 +156,7 @@ namespace Eigen
}
template <typename Derived>
static void eulerAngles_imp(Matrix<typename MatrixBase<Derived>::Scalar,3,1>& res, const MatrixBase<Derived>& mat, internal::false_type isTaitBryan)
static void eulerAngles_imp(Matrix<typename MatrixBase<Derived>::Scalar,3,1>& res, const MatrixBase<Derived>& mat, internal::false_type /*isTaitBryan*/)
{
using std::atan2;
using std::sin;