Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
662 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2021 Dmitry Kazakov <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KISHALFTRAITS_H
#define KISHALFTRAITS_H

#include <KoConfig.h>
#ifdef HAVE_OPENEXR

#include <half.h>
#include <halfLimits.h>

#include <type_traits>

namespace std {

  inline bool
  isfinite(half __x)
  { return __x.isFinite(); }

  inline bool
  isinf(half __x)
  { return __x.isInfinity(); }

  inline bool
  isnan(half __x)
  { return __x.isNan(); }

  inline bool
  isnormal(half __x)
  { return __x.isNormalized(); }

  inline bool
  signbit(half __x)
  { return __x.isNegative(); }

}

#endif

#endif // KISHALFTRAITS_H