make clang-tidy happy.
This commit is contained in:
parent
a19d71ddcb
commit
a33fe4bcdd
@ -863,7 +863,7 @@ class numeric : public schema
|
|||||||
// multipleOf - if the remainder of the division is 0 -> OK
|
// multipleOf - if the remainder of the division is 0 -> OK
|
||||||
bool violates_multiple_of(T x) const
|
bool violates_multiple_of(T x) const
|
||||||
{
|
{
|
||||||
if constexpr (std::is_floating_point_v<T>) {
|
if constexpr (std::is_floating_point<T>::value) {
|
||||||
auto multiple = x / multipleOf_.second;
|
auto multiple = x / multipleOf_.second;
|
||||||
auto error = std::abs((multiple - std::round(multiple)) * multipleOf_.second);
|
auto error = std::abs((multiple - std::round(multiple)) * multipleOf_.second);
|
||||||
return error > std::numeric_limits<T>::epsilon();
|
return error > std::numeric_limits<T>::epsilon();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user