Skip to content

src/core/math_func.h

Namespaces

Name
dakku
dakku namespace

Source code

#ifndef DAKKU_CORE_MATH_FUNC_H_
#define DAKKU_CORE_MATH_FUNC_H_
#include <core/fwd.h>

#include <cmath>

namespace dakku {

template <typename T>
requires std::is_floating_point_v<T> DAKKU_INLINE bool isnan(T x) {
  return std::isnan(x);
}

template <typename T>
requires std::is_integral_v<T> DAKKU_INLINE bool isnan(T) { return false; }
}  // namespace dakku
#endif

Updated on 2022-04-30 at 15:46:11 +0000