1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-13 22:48:50 -05:00

move demo typedefs into namespace

This commit is contained in:
Evan Pezent 2020-06-14 08:31:09 -05:00
parent 504b1ea155
commit 530367db09

View File

@ -31,11 +31,13 @@
#define sprintf sprintf_s
#endif
namespace ImPlot {
/// 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
/// 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
typedef double t_float;
typedef ImPlotPoint t_float2;
@ -54,8 +56,6 @@ typedef ImVec2 t_float2;
#define Fmod fmodf
#endif
namespace ImPlot {
t_float RandomRange(t_float min, t_float max) {
t_float scale = rand() / (t_float) RAND_MAX;
return min + scale * ( max - min );