Use M_PI instead of acos(-1) for pi

This commit is contained in:
Deanna Hood
2015-03-22 06:04:31 +10:00
parent 4bab4790c0
commit 83e5b7656b
2 changed files with 2 additions and 3 deletions

View File

@@ -421,8 +421,7 @@ struct round_retval
EIGEN_DEVICE_FUNC
static inline RealScalar run(const Scalar& x)
{
const double pi = std::acos(-1.0);
return (x < 0.0) ? pi : 0.0; }
return (x < 0.0) ? M_PI : 0.0; }
};
template<typename Scalar>