MeshLib C++ Docs
Loading...
Searching...
No Matches
MRIsNaN.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRBitCast.h"
4#include <limits>
5
6namespace MR
7{
10
11
12constexpr float cQuietNan = std::numeric_limits<float>::quiet_NaN();
14
16inline bool isNanFast( float f )
17{
18 return bit_cast<int>( f ) == cQuietNanBits;
19}
20
21}
constexpr int cQuietNanBits
Definition MRIsNaN.h:13
constexpr To bit_cast(const From &from) noexcept
std::bit_cast wrapper with the compiler's intrinsic fallback
Definition MRBitCast.h:17
constexpr float cQuietNan
Definition MRIsNaN.h:12
bool isNanFast(float f)
quickly tests whether given float is not-a-number
Definition MRIsNaN.h:16
only for bindings generation
Definition MRCameraOrientationPlugin.h:8