mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
28 lines
483 B
C++
28 lines
483 B
C++
// ArduinoJson - arduinojson.org
|
|
// Copyright Benoit Blanchon 2014-2020
|
|
// MIT License
|
|
|
|
#pragma once
|
|
|
|
#include <ArduinoJson/Namespace.hpp>
|
|
|
|
namespace ARDUINOJSON_NAMESPACE {
|
|
|
|
// Some libraries #define isnan() and isinf() so we need to check before
|
|
// using this name
|
|
|
|
#ifndef isnan
|
|
template <typename T>
|
|
bool isnan(T x) {
|
|
return x != x;
|
|
}
|
|
#endif
|
|
|
|
#ifndef isinf
|
|
template <typename T>
|
|
bool isinf(T x) {
|
|
return x != 0.0 && x * 2 == x;
|
|
}
|
|
#endif
|
|
} // namespace ARDUINOJSON_NAMESPACE
|