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:
parent
479c2c0d1e
commit
282c004599
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
|
||||||
#include "exceptions.h"
|
#include "exceptions.h"
|
||||||
#include "mathematics_functions.h"
|
#include "mathematics_functions.h"
|
||||||
|
|
||||||
|
@ -134,7 +133,8 @@ inline Vector3D Vector3D::crossProduct(const Vector3D& vector) const {
|
||||||
|
|
||||||
// Return true if two vectors are parallel
|
// Return true if two vectors are parallel
|
||||||
inline bool Vector3D::isParallelWith(const Vector3D& vector) const {
|
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
|
// Return true if the vector is unit and false otherwise
|
||||||
|
|
Loading…
Reference in New Issue
Block a user