summaryrefslogtreecommitdiff
path: root/src/3rdparty/assimp/code/IFCBoolean.cpp
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2015-11-03 13:09:13 +0100
committerAndy Nichols <andy.nichols@theqtcompany.com>2015-11-05 16:17:18 +0000
commitce630c2e1daac2197d6488a4f5c2b46474bbe566 (patch)
treeca484a9ef9dd709da1aced509f326f8fdffa16af /src/3rdparty/assimp/code/IFCBoolean.cpp
parent03d2259029cafe89c87d49c142131bd16d837c69 (diff)
downloadqt3d-ce630c2e1daac2197d6488a4f5c2b46474bbe566.tar.gz
assimp: Use std namespace for most cmath functions
This also fixes a couple of cases where the int version of abs was used when it should be the float version. Change-Id: Id5063545e5a6e659e95262177217be98766794b0 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/assimp/code/IFCBoolean.cpp')
-rw-r--r--src/3rdparty/assimp/code/IFCBoolean.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/3rdparty/assimp/code/IFCBoolean.cpp b/src/3rdparty/assimp/code/IFCBoolean.cpp
index 8573e4d62..3581d2a9e 100644
--- a/src/3rdparty/assimp/code/IFCBoolean.cpp
+++ b/src/3rdparty/assimp/code/IFCBoolean.cpp
@@ -69,8 +69,8 @@ Intersect IntersectSegmentPlane(const IfcVector3& p,const IfcVector3& n, const I
const IfcVector3 pdelta = e0 - p, seg = e1-e0;
const IfcFloat dotOne = n*seg, dotTwo = -(n*pdelta);
- if (fabs(dotOne) < 1e-6) {
- return fabs(dotTwo) < 1e-6f ? Intersect_LiesOnPlane : Intersect_No;
+ if (std::fabs(dotOne) < 1e-6) {
+ return std::fabs(dotTwo) < 1e-6f ? Intersect_LiesOnPlane : Intersect_No;
}
const IfcFloat t = dotTwo/dotOne;
@@ -210,7 +210,7 @@ bool IntersectsBoundaryProfile( const IfcVector3& e0, const IfcVector3& e1, cons
// segment-segment intersection
// solve b0 + b*s = e0 + e*t for (s,t)
const IfcFloat det = (-b.x * e.y + e.x * b.y);
- if(fabs(det) < 1e-6) {
+ if(std::fabs(det) < 1e-6) {
// no solutions (parallel lines)
continue;
}
@@ -234,7 +234,7 @@ bool IntersectsBoundaryProfile( const IfcVector3& e0, const IfcVector3& e1, cons
if (t >= -epsilon && (t <= 1.0+epsilon || half_open) && s >= -epsilon && s <= 1.0) {
if (e0_hits_border && !*e0_hits_border) {
- *e0_hits_border = fabs(t) < 1e-5f;
+ *e0_hits_border = std::fabs(t) < 1e-5f;
}
const IfcVector3& p = e0 + e*t;
@@ -419,7 +419,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const IfcPolygonalBounded
#ifdef ASSIMP_BUILD_DEBUG
if (isect == Intersect_Yes) {
- const IfcFloat f = fabs((isectpos - p)*n);
+ const IfcFloat f = std::fabs((isectpos - p)*n);
ai_assert(f < 1e-5);
}
#endif