mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
[math] In the impl. of abs() for FP types use std::fabs() if possible.
This fixes the function for long double on some compilers. For all FP types non-std fabs() was called. This function is defined only for double. On compilers supporting long double type more precise than double (GCC, Clang, etc.) this resulted in truncation of the result.
This commit is contained in:
parent
144643ec0c
commit
5a1e553c75
@ -85,6 +85,9 @@ struct abs<T, true>
|
||||
{
|
||||
static inline T apply(T const& value)
|
||||
{
|
||||
using ::fabs;
|
||||
using std::fabs; // for long double
|
||||
|
||||
return fabs(value);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user