Commit 3b9e129a authored by Sina Ackermann's avatar Sina Ackermann Committed by Dennis Gläser
Browse files

[common] allow adl for math functions

parent dd1ed250
......@@ -251,7 +251,8 @@ public:
// first check if we are in the plane of the triangle
// if not we can return early
const double t = v.dot(n);
if (std::abs(t) > v1.two_norm()*eps_) // take |v1| as scale
using std::abs;
if (abs(t) > v1.two_norm()*eps_) // take |v1| as scale
return false;
// compute the normal to the triangle made of point and first edge
......@@ -691,7 +692,8 @@ public:
// small than the interval length and the
// sign of v1 & v2 are the same
using std::abs;
return (std::signbit(v1) == std::signbit(v2)
using std::signbit;
return (signbit(v1) == signbit(v2)
&& abs(v1) < abs(v2)*(1 + eps_));
}
......
......@@ -72,6 +72,7 @@ bool calculateEigenValues(EVVectorType &eigVel, MatrixType& matrix, double relat
double b = -(matrix[0][0] + matrix[1][1]);
double c = matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0];
using std::sqrt;
eigVel[0] = (-b + sqrt(b * b - 4.0 * c)) / 2.0;
eigVel[1] = (-b - sqrt(b * b - 4.0 * c)) / 2.0;
......
......@@ -125,7 +125,8 @@ public:
// if denominator is zero the segment in parallel to
// the plane. If the distance is positive there is no intersection
if (std::abs(denom) < eps)
using std::abs;
if (abs(denom) < eps)
{
if (dist > eps)
return false;
......@@ -134,7 +135,8 @@ public:
{
const Scalar t = -dist / denom;
// if entering half space cut tfirst if t is larger
if (std::signbit(denom))
using std::signbit;
if (signbit(denom))
{
if (t > tfirst)
tfirst = t;
......
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