Fix abs()-related build failure on mac os
Change: 131308407
This commit is contained in:
parent
4747f65877
commit
1fa09b5560
@ -22,7 +22,7 @@ namespace test {
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
bool IsClose(const T& x, const T& y, double atol, double rtol) {
|
bool IsClose(const T& x, const T& y, double atol, double rtol) {
|
||||||
// Need x == y so that infinities are close to themselves
|
// Need x == y so that infinities are close to themselves
|
||||||
return x == y || fabs(x - y) < atol + rtol * fabs(x);
|
return x == y || std::abs(x - y) < atol + rtol * std::abs(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user