mirror of
https://github.com/gwm17/implot.git
synced 2025-04-22 00:18:49 -04:00
move demo typedefs into namespace
This commit is contained in:
parent
504b1ea155
commit
530367db09
|
@ -31,11 +31,13 @@
|
||||||
#define sprintf sprintf_s
|
#define sprintf sprintf_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace ImPlot {
|
||||||
|
|
||||||
/// Choose whether the demo uses double or float versions of the ImPlot API.
|
/// Choose whether the demo uses double or float versions of the ImPlot API.
|
||||||
/// NB: You don't ever need to typdef of define values for ImPlot. This
|
/// NB: You don't ever need to typdef of define values for ImPlot. This
|
||||||
/// is only being done here for the sake of demoing both precision types.
|
/// is only being done here for the sake of demoing both precision types.
|
||||||
|
|
||||||
#define IMPLOT_DEMO_USE_DOUBLE
|
// #define IMPLOT_DEMO_USE_DOUBLE
|
||||||
#ifdef IMPLOT_DEMO_USE_DOUBLE
|
#ifdef IMPLOT_DEMO_USE_DOUBLE
|
||||||
typedef double t_float;
|
typedef double t_float;
|
||||||
typedef ImPlotPoint t_float2;
|
typedef ImPlotPoint t_float2;
|
||||||
|
@ -54,8 +56,6 @@ typedef ImVec2 t_float2;
|
||||||
#define Fmod fmodf
|
#define Fmod fmodf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace ImPlot {
|
|
||||||
|
|
||||||
t_float RandomRange(t_float min, t_float max) {
|
t_float RandomRange(t_float min, t_float max) {
|
||||||
t_float scale = rand() / (t_float) RAND_MAX;
|
t_float scale = rand() / (t_float) RAND_MAX;
|
||||||
return min + scale * ( max - min );
|
return min + scale * ( max - min );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user