summaryrefslogtreecommitdiff
path: root/include/lib/ArduinoJson/Polyfills/math.hpp
blob: 48773edd2fe432fea0ca02172463b00ff7901781 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// MIT License

#pragma once

namespace ArduinoJson {
namespace Internals {
template <typename T>
bool isNaN(T x) {
  return x != x;
}

template <typename T>
bool isInfinity(T x) {
  return x != 0.0 && x * 2 == x;
}
}
}