mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
build: Added snap package (#2348)
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <time.h>
|
||||
#include "imgui_internal.h"
|
||||
#include <cmath>
|
||||
|
||||
#ifndef IMPLOT_VERSION
|
||||
#error Must include implot.h before implot_internal.h
|
||||
@@ -120,7 +121,7 @@ static inline T ImRemap01(T x, T x0, T x1) { return (x - x0) / (x1 - x0); }
|
||||
// Returns always positive modulo (assumes r != 0)
|
||||
static inline int ImPosMod(int l, int r) { return (l % r + r) % r; }
|
||||
// Returns true if val is NAN
|
||||
static inline bool ImNan(double val) { return isnan(val); }
|
||||
static inline bool ImNan(double val) { return std::isnan(val); }
|
||||
// Returns true if val is NAN or INFINITY
|
||||
static inline bool ImNanOrInf(double val) { return !(val >= -DBL_MAX && val <= DBL_MAX) || ImNan(val); }
|
||||
// Turns NANs to 0s
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#ifndef IMPLOT3D_VERSION
|
||||
#include "implot3d.h"
|
||||
#endif
|
||||
@@ -58,7 +60,7 @@ template <typename TSet, typename TFlag> static inline bool ImHasFlag(TSet set,
|
||||
template <typename TSet, typename TFlag> static inline void ImFlipFlag(TSet& set, TFlag flag) { ImHasFlag(set, flag) ? set &= ~flag : set |= flag; }
|
||||
template <typename T> static inline T ImRemap01(T x, T x0, T x1) { return (x1 - x0) ? ((x - x0) / (x1 - x0)) : 0; }
|
||||
// Returns true if val is NAN
|
||||
static inline bool ImNan(float val) { return isnan(val); }
|
||||
static inline bool ImNan(float val) { return std::isnan(val); }
|
||||
// Returns true if val is NAN or INFINITY
|
||||
static inline bool ImNanOrInf(float val) { return !(val >= -FLT_MAX && val <= FLT_MAX) || ImNan(val); }
|
||||
// Turns NANs to 0s
|
||||
|
||||
Reference in New Issue
Block a user