use std::abs() from <cmath> instead of abs() from <cstdlib>

git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@335 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
chappuis.daniel 2010-06-16 21:04:36 +00:00
parent 479c2c0d1e
commit 282c004599

View File

@ -22,7 +22,6 @@
// Libraries
#include <cmath>
#include <cstdlib>
#include "exceptions.h"
#include "mathematics_functions.h"
@ -134,7 +133,8 @@ inline Vector3D Vector3D::crossProduct(const Vector3D& vector) const {
// Return true if two vectors are parallel
inline bool Vector3D::isParallelWith(const Vector3D& vector) const {
return (approxEqual(abs(this->scalarProduct(vector)), length() * vector.length()));
double scalarProd = this->scalarProduct(vector);
return approxEqual(std::abs(scalarProd), length() * vector.length());
}
// Return true if the vector is unit and false otherwise