use std::abs() from <cmath> instead of abs() from <cstdlib>
git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@337 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
085740e765
commit
53ed7b1b3a
|
@ -24,6 +24,7 @@
|
||||||
#include "../constraint/Contact.h"
|
#include "../constraint/Contact.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
|
#include <cmath>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream> // TODO : Delete this
|
#include <iostream> // TODO : Delete this
|
||||||
|
|
||||||
|
@ -436,7 +437,7 @@ double SATAlgorithm::computePenetrationDepth(double min1, double max1, double mi
|
||||||
double penetrationDepth = (lengthInterval1 + lengthInterval2) - lengthBothIntervals;
|
double penetrationDepth = (lengthInterval1 + lengthInterval2) - lengthBothIntervals;
|
||||||
|
|
||||||
// Find which interval is at the left of the other
|
// Find which interval is at the left of the other
|
||||||
if (abs(max1-min2) <= abs(max2-min1)) {
|
if (std::abs(max1-min2) <= std::abs(max2-min1)) {
|
||||||
// Right of interval 1 collides with the left of interval 2
|
// Right of interval 1 collides with the left of interval 2
|
||||||
side = true;
|
side = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user