Verified Commit 7406e3f3 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

math: revert to classic assert

parent d74fc982
......@@ -86,13 +86,13 @@ namespace pinocchio
#ifndef NDEBUG
const Scalar epsilon = sqrt(sqrt(Eigen::NumTraits<Scalar>::epsilon()));
typedef apply_op_if<less_than_or_equal_to_op,boost::is_floating_point<Scalar>::value,true> static_leq;
PINOCCHIO_ASSERT_THROW_AT_RUNTIME(static_leq::op(math::fabs(N2-1.), epsilon));
assert(static_leq::op(math::fabs(N2-1.), epsilon));
#endif
const Scalar alpha = ((Scalar)3 - N2) / Scalar(2);
PINOCCHIO_EIGEN_CONST_CAST(D,q).coeffs() *= alpha;
#ifndef NDEBUG
const Scalar M = Scalar(3) * math::pow(Scalar(1)-epsilon, ((Scalar)-Scalar(5))/Scalar(2)) / Scalar(4);
PINOCCHIO_ASSERT_THROW_AT_RUNTIME(static_leq::op(math::fabs(q.norm() - Scalar(1)),
assert(static_leq::op(math::fabs(q.norm() - Scalar(1)),
math::max(M * sqrt(N2) * (N2 - Scalar(1))*(N2 - Scalar(1)) / Scalar(2), Eigen::NumTraits<Scalar>::dummy_precision())));
#endif
}
......
......@@ -25,7 +25,7 @@ namespace pinocchio
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector3,3);
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix3,3,3);
PINOCCHIO_ASSERT_THROW_AT_RUNTIME_WITH_MESSAGE(isUnitary(axis), "The axis is not unitary.");
assert(isUnitary(axis) && "The axis is not unitary.");
Matrix3 & res_ = PINOCCHIO_EIGEN_CONST_CAST(Matrix3,res);
Vector3 sin_axis = sin_value * axis;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment